The invoker servlet is no longer active by default in Tomcat.
See: http://jakarta.apache.org/tomcat/faq/misc.html#evil
Core Servlets (1st Edition) is a bit out of date in this respect.

You'll need to map your servlet in your web.xml file.
If you want an example, I've published some war files that you can just
drop into your webapps directory and run.
http://simple.souther.us

SimpleServlet has a web.xml file with a servlet mapping in it.





On Wed, 2005-01-26 at 13:44, Anil Philip wrote:
> See http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Download-Tomcat
> 
> 
> -----Original Message-----
> From: Harsha perera [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 25, 2005 12:04 AM
> To: [email protected]
> Subject: Deploying a Servlet to Tomcat 5.0
> 
> Hi,
> 
> I have been trying to deploy a simple servlet to
> Tomcat 5.0. Tomcat is installed on WIndows XP.
> 
> This is what I did:
> 1. Created a directory structure under 
>    $TOMCAT_HOME\webapps as follows:
>    ROOT\WEB-INF\classes
> 
> 2. Moved the class(HelloServlet.class) to the
>    above created directory.
> 
> 3. Bounced Tomcat.
> 
> 4. Attempting to access the class as 
>    http://localhost:8080/servlet/HelloServlet gives 
>    me the error:
>    HTTP Status 404 - /servlet/HelloServlet
> 
> ----------------------------------------------------------------------------
> ----
> 
> type Status report
> 
> message /servlet/HelloServlet
> 
> description The requested resource
> (/servlet/HelloServlet) is not available.
> 
> 
> Please advise on how I should be deploying this simple
> servlet. 
> 
> The servlet is code is given below:
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> 
> /** Simple servlet used to test server.
>  *  <P>
>  *  Taken from Core Servlets and JavaServer Pages 2nd
> Edition
>  *  from Prentice Hall and Sun Microsystems Press,
>  *  http://www.coreservlets.com/.
>  *  &copy; 2003 Marty Hall; may be freely used or
> adapted.
>  */
> 
> public class HelloServlet extends HttpServlet {
>   public void doGet(HttpServletRequest request,
>                     HttpServletResponse response)
>       throws ServletException, IOException {
>     response.setContentType("text/html");
>     PrintWriter out = response.getWriter();
>     String docType =
>       "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 "
> +
>       "Transitional//EN\">\n";
>     out.println(docType +
>                 "<HTML>\n" +
>                 "<HEAD><TITLE>Hello</TITLE></HEAD>\n"
> +
>                 "<BODY BGCOLOR=\"#FDF5E6\">\n" +
>                 "<H1>Hello</H1>\n" +
>                 "</BODY></HTML>");
>   }
> }
> 
> 
> 
> Regards
> Harsha
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to