Thanks, but it seems there 's already an X started ps awx: 943 ? S 0:00 /etc/X11/X -auth /var/gdm/:0.Xauth :0 INIT_VERSION=sysvinit-2.78 TERM=linux HOSTTYPE=i386 PATH=/sbin:/usr I must tell you that I know a little Linux but i'm not an expert. Emmanuel P. -----Message d'origine----- De : Gabriel Ciuloaica [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 9 août 2000 11:27 À : [EMAIL PROTECTED] Objet : Re: error message while creating a gif from a servlet Must to start XWindows system before you start tomcat. Gabriel Ciuloaica ----- Original Message ----- From: "Emmanuel PINARD - Sicavonline" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 09, 2001 1:24 PM Subject: error message while creating a gif from a servlet > Hello , > > I'm using Tomcat with apache in a RedHat6.2 > I got this message while i was trying to return a data stream to my browser > in order to create a gif. > > Emmanuel P. > > -------------------------------------------------------------------------- -- > ----------- > > Error: 500 > Location: /examples/servlet/Fury > Internal Servlet Error: > > java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java, Compiled Code) > at > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment > .java, Compiled Code) > . > . > . > . > at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, > Compiled Code) > at java.lang.Thread.run(Thread.java, Compiled Code) > > > -------------------------------------------------------------------------- -- > --------- > > my code is: > > import javax.servlet.*; > import javax.servlet.http.*; > import java.io.*; > import java.util.*; > import Acme.JPM.Encoders.*; > import java.awt.image.*; > import java.awt.*; > > public class Fury extends HttpServlet { > > public void doGet(HttpServletRequest request, HttpServletResponse > response) > throws ServletException, IOException > { > response.setContentType("image/gif"); > ServletOutputStream out = response.getOutputStream(); > BufferedImage graph = new BufferedImage(100,100, > BufferedImage.TYPE_INT_RGB); > > Graphics g = null; > g = graph.getGraphics(); > g.setColor(Color.green); > g.fillRect(0, 0, 100, 100); > g.setColor(Color.red); > g.drawOval(0, 0, 100,100); > new GifEncoder(graph, out, true).encode(); > out.close(); > } > > public void doPost(HttpServletRequest request, HttpServletResponse > response) > throws ServletException, IOException { > doGet(request,response); > } > } > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: error message while creating a gif from a servlet
Emmanuel PINARD - Sicavonline Tue, 09 Jan 2001 02:31:54 -0800
- error message while creating a gif from a se... Emmanuel PINARD - Sicavonline
- Re: error message while creating a gif ... Gabriel Ciuloaica
- RE: error message while creating a ... Emmanuel PINARD - Sicavonline
- RE: error message while creatin... Ed Gomolka
