Reputation: 23
I'm a newbie to this area and need help.
I'm working with Jasper reports server. My goal is to call a report published in JasperServer from a jsp. Is it possible?
Until now I was able to show a report on a html page using http api, but the problem there is that user credential are in cleartext and not hidden.
Any ideas?
Upvotes: 2
Views: 3276
Reputation: 613
Try using Rest API of JasperServer and use some rest clients like Jersey to get the response of your report as input stream and render that in your JSP.
Upvotes: 3
Reputation: 23
After reading all yours suggestion i came up with this solution:
PutMethod put = new PutMethod(request3);
put.setRequestEntity(new StringRequestEntity(descriptor, "text/xml", "UTF-8"));
int statusCode3 = client.executeMethod(put);
//System.out.println(put.getResponseBodyAsString());
String report = put.getResponseBodyAsString();
Simply i found a way to set up the body of my PUT HTTP request and everything works fine! I posted the solution maybe can help someone!
Cheers!!
Upvotes: 0
Reputation: 15740
I think these are helpful to you.
Calling a .jasper file from a JSP
Streaming a PDF Jasper Report Using JSP
Upvotes: 0