Question

We are launching the BIRT 3.7.2 Viewer Webapp in an embedded Jetty server in our application, and for legal reasons we are not allowed to edit the war file ourselves.

We want to disable a few options in the viewer such as server side printing and the ability to re-run a report.

The printing was simple enough, just by using an override descriptor to override the web.xml and set the BIRT property which disables it.

However the re-run is proving more difficult. We have several Jetty Handlers wrapping the WebApp and we first thought to attempt to filter the request containing the the re-run command, but the problem is it seems to be identical to the view request.

When first rendering a report using the BIRT viewer three necessary requests are logged in the Jetty webserver: /birt/frameset?__document=hello_world.rptdocument - GET request /birt/webcontent/birt/pages/common/processing.jsp?__rtl=false - GET request /birt/frameset?__document=hello_world.rptdocument&__sessionId=20130710_161752_347 - POST request

And when re-running: /birt/frameset?__document=hello_world.rptdocument&__sessionId=20130710_161752_347- POST request

This is making filtering the URL difficult, as the request objects seem identical, and there appears to be nothing in the logs for Jetty or the BIRT viewer that explain why it is treated differently (i.e rerunning a report as opposed to just rendering it).

Any help would be greatly appreciated.

Thanks,

Rob

Was it helpful?

Solution

So it turns out that the POST requests had SOAP content, with an <Operator> tag.

For the initial viewing of the report, the value of this tag was GetPage, whereas for the re-run the request was ChangeParameter, so I could filter server-side on this.

This did however obviously involve reading the HttpServletRequest body using getInputStream(), so I had to wrap the request for the following Handlers in the chain using the method outlined here: http://www.coderanch.com/t/445053/Web-Services/java/Extract-SOAP-object-HttpServletRequest

Hope this helps anyone else wishing to do the same.

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