File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Jasper usage in J2EE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper usage in J2EE" Watch "Jasper usage in J2EE" New topic
Author

Jasper usage in J2EE

Ranjith Kodikara
Greenhorn

Joined: Sep 03, 2002
Posts: 15
Hi,
I am evaluating Jasper for some of my future projects. I want to know whthwe Jasper can be used inside Tomcat or other servlet container to present report to users. In an standalone application, I can generate a .pdf type report to a directory of OS. If I use a servlet, will I be able to give the .pdf report as the servlet output? (This is like setting contentType we can out put an xml file instead of html. Like that can we give the .pdf report as output??). If you have sample source code, it will be fine too.

I would be grateful for your help and it's very much appreciated.

Thanks and best regards,
Ranjith
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Yes, you can output PDF from a servlet as well. Your content type would be "application/pdf".

And I had a quick look at the Jasper Reports documentation page which has a link to this article about Jasper Reports in J2EE.
Ranjith Kodikara
Greenhorn

Joined: Sep 03, 2002
Posts: 15
Thank you very much Paul. I read the article you reffered and it contains the information I requested. Your help is very much appreciated.

When further looking at this matter, I found that there is a webapp folder in Jasper sample applications. Its coming with the Jasper installation package.

If someone is looking for the answer to j2ee-jasper integration, that webapp sample directory's path is jasperreports-1.2.3\demo\samples\webapp.


Thanks,
Ranjith (ranjith@dmsswt.com)
Richard Walton
Greenhorn

Joined: Jul 01, 2002
Posts: 10
Yip its a very cool demo but if you want somethign better let me know i have some code.
Also have a look at BIRT. ( Eclipse project)


<a href="http://www.johnboy.co.za" target="_blank" rel="nofollow">http://www.johnboy.co.za</a><br />Change - When the winds of change blow hard enough, the most trivial things can turn into deadly projectiles.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jasper usage in J2EE