Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319859

Summary: Scriptlib setting in web.xml ignored
Product: z_Archived Reporter: Steve Schafer <sschafer>
Component: BIRTAssignee: Birt-ReportViewer <Birt-ReportViewer-inbox>
Status: NEW --- QA Contact: mindan xu <mindan.xu>
Severity: normal    
Priority: P3 CC: bluesoldier
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Steve Schafer CLA 2010-07-14 10:14:33 EDT
Build Identifier: M20100211-1343

When I set the BIRT_VIEWER_SCRIPTLIB_DIR context param in web.xml in the viewer plugin it is ignored in BIRT 2.5.2 when I preview the report.  The same setting in 2.3.2 works fine.  

To try to track this down I ran BIRT in a debug instance and stepped through the code.  The scriptlib param, along with may other params, is read in org.eclipse.birt.report.utility.ParameterAccessor.initParameters(ServletContext).  When I step into this method, the hash map that it looks in is completely empty.   I don't know if this is a fair test, but it's worth noting.


Reproducible: Always

Steps to Reproduce:
1. Set the BIRT_VIEWER_SCRIPTLIB_DIR context parameter in web.xml to a directory that contains a jar file that contains event handlers.
2. Open eclipse and preview a report that utilizes one of the event handlers.
3. You should get an error in the HTML output saying the class is not found.
Comment 1 Steve Schafer CLA 2010-08-02 16:39:20 EDT
Correction:  Setting scriptlib in web.xml doesn't work in 2.3.2 either.  I was fooled into thinking it worked because I had a project with the source code for the event handlers in the workspace and that's where they were coming from.  Once I closed that project, the reports could no longer find the event handlers, despite the setting in web.xml.