This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes JasperReport ServletException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "JasperReport ServletException" Watch "JasperReport ServletException" New topic

JasperReport ServletException

Luciano A. Pozzo
Ranch Hand

Joined: Jun 20, 2005
Posts: 112

I'm using jasper report for generate a pdf report. When I run the application on localhost (windows) the pdf is generated perfectly, but when I put on fedora I catch ServletException, when I invoke

My code:

and the Action (Struts)

Luciano A. Pozzo
Ranch Hand

Joined: Jun 20, 2005
Posts: 112
hehehe... I solve!
The problem happen because the jasper have to access graphic interface's configurations, so they can't on Linux, because I'm using the terminal (server), so I should pass the command "-Djava.awt.headless=true" for jvm. Or you can put on JAVA_OPTS variable (jboss).
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JasperReport ServletException
Similar Threads
Problem while generating PDF from Servlet using Jasper Report
Problem in passing JRBeanCollectionDataSource as parameter to jasperreport
Printing using ireport 3.7.4 and jsp
Jasper subreport not getting displayed when Jasper print is called twice
.jasper report return null values