Hi,
I am upgrading from JasperReports Server v4.5.0 to v5.0.1 running on jboss 5.1. We use HTTP API to run reports integrated with our portal using SSO. The reports use CustomDataSource which calls a web service to retrieve data. Before it could call the web service we need to fetch the HttpServletRequest object to fetch some session values to be passed along with the web service call. We use the following calls to retrieve request object.
private HttpServletRequest getHttpServletRequest() {
HttpServletRequest request = null;
//Object object = RequestContextHolder.currentRequestAttributes();
ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if(attrs != null) {
request = attrs.getRequest();
}
return request;
}
This works fine in 4.5.0. However, it returns null in 5.0.1. Could you please advise what could have changed to cause this. Any pointers highly appreciated.
Thanks,
0 Answers:
No answers yet
Hi,
Do you got the solution of your problem?. Also i have to do the same thing, i have jasper soft 5.0 running on jboss. I want to use custom bean data source which internally calls webservice to get the reports contents. How to configure new bean data sources in jasper server. What all configurations require for this?
Any help is appecriated. Thanks in advance.
You can create your own applicationContext-ds.xml file and define your CustomDataSourceService
This bean will be responsible for instantiating your CustomDataSource. More details here http://community.jaspersoft.com/wiki/custom-data-source-sample-readme