Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319859 - Scriptlib setting in web.xml ignored
Summary: Scriptlib setting in web.xml ignored
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportViewer CLA
QA Contact: mindan xu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 10:14 EDT by Steve Schafer CLA
Modified: 2010-11-18 22:17 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.