Search code examples
web-servicesjspjasperserver

Calling a Jasper Server report from jsp


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?


Solution

  • 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!!