Jump to content

Using Jasper Report in J2EE


chamith

Recommended Posts

I'm using Jasperreports in my web application.It's working in localhost, but not in web server.When I view the report in jsp, It gives me an ERROR..!

"java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it."

How did I resolve this.... Please help me.. I need answer as quickly as posible....

Thank you

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Add  -Djava.awt.headless=true into your JAVA environment of your web server.

For exmple, I add it into setenv.sh of $TOMCAT_HOME/bin, here is my setenv.sh under Linux:

JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -d64 -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=128m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...