Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] CHECKIN: Load user's script lib in web app environment

Title: CHECKIN: Load user’s script lib in web app environment

- Summary:
Load user’s script lib in web app environment

- Bugzilla Bug (s) Resolved:
None

- Description:
With the Java based scripting feature, user can develop some custom script libraries (JARs). This checkin implemented how engine loads these JARs in web application environment.

A new parameter called BIRT_VIEWER_SCRIPTLIB_DIR is added to web.xml. Similar as setting log directory in viewer, user can specify the location of his script libraries by using that parameter. If no value is specified, the default location birt/scriptlib will be used. When engine tries to load a script class (in script executor), it will look into all the JAR files in the script lib directory and its sub-directories.

- Tests Description:
Created a custom script lib which changes the color of labels. Put the JAR file under a custom location and set BIRT_VIEWER_SCRIPTLIB_DIR. The script class can be loaded correctly in the web app environment and the label control’s color was changed.

- Files Edited:
/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ScriptExecutor.java
/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/services/ReportEngineService.java
/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/viewer/utilities/ParameterAccessor.java
/org.eclipse.birt.report.viewer/birt/WEB-INF/web.xml

- Files Added:
/org.eclipse.birt.report.viewer/birt/scriptlib/.cvsignore

- Code Reviewer:
Wenbin, Jun

- Notes to Build Team:

- Notes to Developers:

- Notes to QA: 
 
- Notes to Documentation:
The new parameter in web.xml needs to be documented.



Back to the top