Did you create a <Context> entry in the server.xml of tomcat? Michael
-----Original Message----- From: Shaffin Bhanji [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 10:59 AM To: [EMAIL PROTECTED] Subject: HELP: Deploying Simple Servlet Hello, I have created a simple HttpServlet in JBuilder 8 Foundation which looks as follows: import javax.servlet.*; import javax.servlet.http.*; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class HelloServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, java.io.IOException { resp.getWriter().println("<html><body>Hello World!!!</body></html>"); } public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, java.io.IOException { resp.getWriter().println("<html><body>Hello World!!!</body></html>"); } } I compiled it into a class file "HelloServlet.class" and deployed it as follows: {TOMCAT4_PATH}/webapps/HelloServlet/WEB-INF/classes/HelloServlet.class {TOMCAT4_PATH}/webapps/HelloServlet/WEB-INF/web.xml My web.xml file looks as follows: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <servlet> <servlet-name> HelloServlet </servlet-name> <servlet-class> HelloServlet </servlet-class> </servlet> </web-app> I start Tomcat and tried to access the servlet as follows: http://localhost:8080/HelloServlet http://localhost:8080/HelloServlet/HelloServlet but all fails and i get an error: HTTP Status 404 - /HelloServlet/HelloServlet ---------------------------------------------------------------------------- ---- type Status report message /HelloServlet/HelloServlet description The requested resource (/HelloServlet/HelloServlet) is not available. ---------------------------------------------------------------------------- ---- Apache Tomcat/4.1.18 Can someone please help!!!! Shaffin N. Bhanji Technical Manager Cambridge Technology Partners, the global eServices company of Novell, Inc. www.ctp.com 905.946.4817 | office 416.524.9520 | cell 905.940.2688 | fax [EMAIL PROTECTED] [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]
