Sorry, Can't connect to X11 window server

By: Cristian Correa M. - ccorrea14
Sorry, Can't connect to X11 window server
2003-07-08 09:10
Hi all
I am so sorry, but I don't understand the solutions for this error. I'm using red hat linux server v.8, j2sdk1.4.1_01, Apache Tomcat/4.1.18.
> I was trying to connect X11 Server on RedHad, the X11 server was up, but my application still failded with the same error.
> I don't know what "Xvbf" is, where can I find this option or program?
> where can I put this option
"D-java.awt.headless=true" in Tomcat, in what file?
> I am exporting a pdf from a servlet of my web application, I have this code:
Map parameters = new HashMap();
parameters.put("pr_Cupo", cupo);
parameters.put("BaseDir", reportFile.getParentFile());
bytes = JasperRunManager.runReportToPdf(reportFile.getPath(), parameters, coneccion);

> In my application How do I utilize "the PJA Toolkit"? In where I have to change the code?

I hope that you can help me...
Bye





By: Jason Essington - essington
RE: Sorry, Can't connect to X11 window server
2003-07-18 13:04
You don't need Xvbf or PJA if you are using java 1.4.1!

All you have to do is set the system property

java.awt.headless=true

One way to do it (certainly not the best way) would be to have a static method in the servlet that calls JasperReports something like

static {
System.setProperty("java.awt.headless", "true");
}

There is probably a better way to set the property through the tomcat configuration (setup) somewhere, but I am not familiar enough with tomcat to know where.

-jason
2002 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:28am
Last seen: 16 years 10 months ago

0 Answers:

No answers yet
Feedback
randomness