tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mantri, Mr Ramesh" <>
Subject RE: tomcat apparently shutting down by itself
Date Thu, 06 Jul 2000 03:13:57 GMT
Dear all,
   (First off, thank you, Aleksey)
When started from sh, tomcat didn't die away. This should perhaps
be included in tomcat FAQ.

We still have a major problem - that with images. When we try to
send an image file from servlet to applet, for some reason it is
throwing a FileNotFoundException. Do we need to configure images
separately in tomcat? The documentation doesn't say so. In any
case I am appending below a few lines of code. Please take a look
at it and try to identify the source of the problem.

public class testImage extends JApplet {
   public void init() {
      try {
         URL url = new URL("http://host:port/WEBAPP/servlet/testImage");
         URLConnection con = url.openConnection();
         ObjectInputStream objStr = new
         ImageIcon img = (ImageIcon) objStr.readObject();
         Container cp = getContentPane();
         JLabel lbl = new JLabel(img);
      } catch (Exception e) {

public class testImage extends HttpServlet {
   public void doGet(HttpServletRequest req, HttpServletResponse res)
   throws ServletException, IOException {
      URL url = new URL("http://host:port/WEBAPP/images/someImage.gif");
      ImageIcon img = new ImageIcon(url);
      ObjectOutputStream out = new

Exception Stack Trace
===================== http://host:port/WEBAPP/servlet/testImage
at<init>(Compiled Code)
at<init>(Compiled Code)
at Code)

Also, allow me to add that another test applet and servlet which pass only
String data are working fine. That causes us to suspect that it could be a 
problem caused due to the transmission of image data from servlet to applet.

Ramesh Mantri

-----Original Message-----
From: Aleksey Tsalolikhin []
Sent: Wednesday, July 05, 2000 5:18 PM
Subject: Re: tomcat apparently shutting down by itself

Dear Sir,

	What shell are you starting tomcat from?

	If not sh, try starting tomcat from sh.

	I've seen it before where a daemon is started from another
shell (like tcsh) and then it dies, when the xterm is closed.

Hope this helps,
Aleksey Tsalolikhin

View raw message