Santiago,
You are getting it because your servlet needs to access the X Window server
to process the image. You can resolve the problem by doing the following:
One way is to set your DISPLAY variable in the window that you start
Tomcat. You should set it as follows: DISPLAY = 127.0.0.1:0.0 and then
export the variable.
If you don't have an X Window server on your machine, you should try and
find a package called xvfb and install it on your machine.
If you search the SERVLET-INTEREST archives, you can find more info on this
question and the solutions
At 09:05 AM 9/12/01 +0200, you wrote:
>Hi all!
>
>I have a servlet that generate jpeg files.
>When I run it in NT + IIS + JRUN I don't have problems but when I try to
>run in LINUX+NES+JRUN, I obtain the next error:
>
>Exception in thread "main" java.lang.InternalError: Can't connect to X11
>window server using ':0.0'
>as the value of the DISPLAY variable.
> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at
>sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java, Compiled Code)
> at
>java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
>.java:63)
> at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:61)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java, Compiled Code)
> at java.awt.Toolkit$2.run(Toolkit.java:499)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java, Compiled Code)
> at java.awt.Window.getToolkit(Window.java, Compiled Code)
> at java.awt.Frame.addNotify(Frame.java, Compiled Code)
>
>Does anybody know why I obtain this error?
>
>Thanks!
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets