Anand,
I often run into problems like this, and is often something I have over 
looked.
I would attempt to run the Snoop Servlet(http://localhost:8080/SnoopServlet) 
first ( the one that comes with Tomcat ) if that executes fine then you know 
Tomcat is configured fine.
The next thing I would recommend would be to modify the Snoop Servlet by 
adding the line

System.out.print("hello world");

recompile and see if this is printed to the screen when the Snoop Servlet is 
run.  If this works then there is something wrong with your code( often this 
means there is another copy of the servlet somewhere else in the classpath).

One last question, how are you starting Tomcat?  If is run as a 
service(NT)/process(Unix) you will not see the output.

Let me know if you have any furthur questions?






>From: Anand Parikh <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Help!!Servlet messages to console/xconsole
>Date: Mon, 16 Sep 2002 16:10:43 -0700 (PDT)
>
>Folks,
>
>I am running tomcat 4.0.4, JDK 1.3, Debian linux 2.2.6.
>The following example is from the book "Java for the Web with Servlets, 
>JSP,
>EJB" by Budi Kurniawan.
>It should send messages to the console/xconsole but I get errors.
>There are no error messages in the log file, the access log file shows
>a HTTP code of 200 ??
>I know the xconsole is working, I can send messages to the xconsole as a 
>user
>and as root.
>I am stuck... any help is highly appreciated.
>
>Thanks,
>Anand
>
>
>Netscape Error:
>----------------
>The document contained no data.
>Try again later or contact the server's administrator.
>
>PrimitiveServlet.java
>-----------------------
>import javax.servlet.*;
>import javax.servlet.http.*;
>import java.io.*;
>import java.io.IOException;
>import java.util.*;
>
>
>public class PrimitiveServlet implements Servlet {
>
>   public void init(ServletConfig config) throws ServletException {
>     System.out.println("init");
>   }
>
>   public void service(ServletRequest request, ServletResponse response)
>     throws ServletException, IOException {
>     System.out.println("service");
>   }
>
>   public void destroy() {
>     System.out.println("destroy");
>   }
>
>   public String getServletInfo() {
>     return null;
>   }
>   public ServletConfig getServletConfig() {
>     return null;
>   }
>
>}
>
>
>access log file:
>------------------
>127.0.0.1 - - [16/Sep/2002:17:24:14 -0500] "GET
>/myApp/servlet/PrimitiveServlet/ HTTP/1.0" 200 -
>127.0.0.1 - - [16/Sep/2002:17:24:21 -0500] "GET /myApp/servlet/Primitive/
>HTTP/1.0" 200 -
>
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! News - Today's headlines
>http://news.yahoo.com
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to