Community
Participate
Working Groups
Created attachment 105447 [details] Security Filter I am trying to integrate BIRT viewer into an application (created with SEAM, but it could be any JAVAEE application). I just wanted to put a filter before the servlet request: my filter in described in BirtSecurityFilter.java And in web.xml I modified the following (adding /aaa/ before frameset): ------------------------------------------ <servlet-mapping> <servlet-name>ViewerServlet</servlet-name> <url-pattern>/aaa/frameset</url-pattern> </servlet-mapping> ------------------------------------------ and added the filter configuration: ------------------------------------------ <filter> <filter-name>BIRT Security Filter</filter-name> <filter-class>BirtSecurityFilter</filter-class> </filter> <filter-mapping> <filter-name>BIRT Security Filter</filter-name> <url-pattern>/aaa/*</url-pattern> </filter-mapping> ------------------------------------------ The concept is that under a determined path (in my case /aaa/) everything is under security and it's intercepted by the filter for a verify. But calling the /aaa/frameset?__report=test.rptdesign in the browser I get an empty page and the console shows the message contained in the filter (so it entered). And if I mistake the name of the report (adding _error): /aaa/frameset?__report=test.rptdesign_error I get file not found error (it's correct that the report does not exist): ------------------------------- - The report file : /opt/jboss-4.2.2.GA/server/default/./deploy/viewer.war/test.rptdesign_error does not exist or contains errors. org.eclipse.birt.report.exception.ViewerException: The report file : /opt/jboss-4.2.2.GA/server/default/./deploy/viewer.war/test.rptdesign_error does not exist or contains errors. at org.eclipse.birt.report.context.ViewerAttributeBean.getDesignHandle(ViewerAttributeBean.java:632) at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:211) ------------------------------- I don't understand this behaviour. It looks like that Birt has some problem with filter (maybe ajax call???). If I map my filter before preview servlet, everything goes well, I enter the filter and the report is displayed. So I think the problem is with frameset's ajax. Bye
Currently, the BIRT servlets expect the servlet path to be exactly "/frameset" not "/aaa/frameset". This test is done by the ViewerServlet to differentiate between "frameset" and "run". So changing the servlet path is currently not supported.
I think that's a very high limitation for BIRT integration in other applications. Shouldn't be the ViewerServlet agnostic against its servlet-mapping configuration? Regards, N
Yes, I agree. But to make it more flexible, it might need more changes, as the servlet names and paths are fixed in many places in the code. I think that allowing the user to add a prefix to the servlet name would still be feasible without too many code changes (and less regression risks). So we could allow something like "/mypath/frameset", but not "/mypath/myframesetservletname".
From my user/developer point of view the problem was only the filter: frameset doesn't work when working with a filter before of it. So the intergration of the viewer is not possible. Changing the servlet name is not so important.
Needs more investigation for a more complete and integrated solution.
add plan keyword to consider this enh for future release.
Hello, I would to integrate birt in our web application j2ee , and I'm also interested about this development. I would to add a prefix in the mapping, like '/birt/run'. Thank you for considering that this is an important improvement for us.
Hello Nicola and Julien, I would like to encourage you to take a look at the Actuate BIRT Viewer which already addresses this feature request. More information about this is available at: http://www.birt-exchange.com/be/products/birt-report-viewers/actuate-viewer/features/?articleid=17179 Thanks! Krishna Venkatraman