Question

From a Database I have created and want to create a new Database then copy a number of design elements into it. However, I want to make sure that : 1. That the extension Library is installed? 2. Set the com.ibm.xsp.extlib.library property in the target. 3. What version of the library is installed?

I need to do this because the process will take place on a third parties system, and I will have no control over their configuration, but if it fails to meet a minimum standard I will stop the process and warn the user.

Was it helpful?

Solution

Point 1 and 3 of your question you can solve with following Java code:

    try {
        String version = com.ibm.xsp.extlib.util.ExtLibUtil.getExtLibVersion();
    } catch (Exception e) {
        // ExtLib not installed
    }

If Extension Library is installed properly then you get the version. Otherwise an exception will be thrown and you can handle this case in catch block.

If you are developing in LotusScript then put this code into an Java agent and execute it from LotusScript.

For point 2 you have to add the line

xsp.library.depends=com.ibm.xsp.extlib.library

to file WebContent/WEB-INF/xsp.properties.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top