You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Didier Bretin <db...@informactis.com> on 2000/11/06 11:08:26 UTC
using javax.swing.ImageIcon with servlet
Hello,
In my servlet I use the package javax.swing.ImageIcon to get the size
of an image. But apparently, this package need a X11 display. On my server
I don't have X launched. Do you see how to solve this ? Do I need to use
another package ?
Here is my error:
Error: 500
Location: /bib
Internal Servlet Error:
java.lang.InternalError: Can't connect to X11 window server using
'<mon serveur>:10.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:58)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.jav
a:59)
at sun.awt.motif.MToolkit.(MToolkit.java:56)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.Toolkit$2.run(Toolkit.java:495)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:488)
at javax.swing.ImageIcon.(ImageIcon.java:60)
at javax.swing.ImageIcon.(ImageIcon.java:79)
at Bibliotheque.reduit(Bibliotheque.java:162)
at Bibliotheque.doGet(Bibliotheque.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne
ctionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:475)
Thanks !
--
.------------------------------------------------.
.^. | Didier Bretin, France | dbr@informactis.com |
/V\ |-----------------------| www.informactis.com |
// \\ | `------------------------|
/( )\ | Visit: http://www.multimania.com/cieexcalibur/ |
^^-^^ `------------------------------------------------'