Hi,
Don't put the servlet.jar (or servlet-api.jar, or any other jars that
ship with Tomcat) in your WEB-INF/lib directory.

Do declare and map your servlet in web.xml.

Check out the "First Webapp" guide at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/index.html.

Yoav Shapira http://www.yoavshapira.com


>-----Original Message-----
>From: Raasi Potluri [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, November 02, 2004 11:28 AM
>To: [EMAIL PROTECTED]
>Subject: can't run a simple servlet on tomcat5.5 server
>
>Hello friends, I have written a simple servlet,
>compiled it and placed in a folder called
>web-inf/classes and I have placed sevlet.jar file in
>web-inf/lib folder. I'm using a Tomcat5.5 version and
>my tomcat server is running and when I'm trying to
>call my servlet is with an URL like this gives an
>error
>
>URL =
>http://localhost:3030/examples/servlet/HelloClientServlet
>
>please help me, I'm stuck with this error since
>yesterday,
>
>regards,
>
>raasi
>
>the error message it gives me is
>***********************************************************************
****
>*******************
>
>HTTP Status 404 - /examples/servlet/HelloClientServlet
>
>-----------------------------------------------------------------------
----
>-----
>
>type Status report
>
>message /examples/servlet/HelloClientServlet
>
>description The requested resource
>(/examples/servlet/HelloClientServlet) is not
>available.
>
>
>-----------------------------------------------------------------------
----
>-----
>
>Apache Tomcat/5.5.4
>
>***********************************************************************
****
>*******************
>
>my servlet is like this
>
>[CODE]
>
>import java.io.*;
>import javax.servlet.*;
>import javax.servlet.http.*;
>
>public class HelloClientServlet extends HttpServlet
>{
>protected void doGet(HttpServletRequest req,
>HttpServletResponse res)
>throws ServletException, IOException
>{
>res.setContentType("text/html");
>PrintWriter out = res.getWriter();
>out.println("<HTML><HEAD><TITLE>Hello
>Client!</TITLE>"+
>"</HEAD><BODY>Hello Client!</BODY></HTML>");
>out.close();
>}
>
>public String getServletInfo()
>{
>return "HelloClientServlet 1.0 by Stefan Zeiger";
>}
>}
>
>
>[CODE]
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Check out the new Yahoo! Front Page.
>www.yahoo.com
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to