hi , I have some questions in using tomcat 5.5.9: I create my web application under "myapp" directory (the structure of directory is below:) { myapp(dir)--- ---WEB-INF(dir)---classes(dir)---HelloWorld.class ---web.xml ---context.xml ---index.jsp
web.xml: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsysems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>My Web Application</display-name> <description>A application for test.</description> <!-- JSPC servlet mappings start --> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/servlet/HelloWorld</url-pattern> </servlet-mapping> <!-- JSPC servlet mappings end --> </web-app> context.xml <Context path="/myapp" docBase="${catalina.home}/webapps/myapp" debug="0" reloadable="true"/> } and deploy it under {catalina.home}/webapps directory . Then i restart tomcat and try to open my application by using http://localhost:8080/myapp/index.jsp but tomcat report a http404 error . After i added "<Context path="/myapp" docBase="${catalina.home}/webapps/myapp" debug="0" reloadable="true"/>" to the element of Host of server.xml file and restart tomcat ,the problem still existed. Also ,I fail to use "tomcat web application manager" to start the application : when I click the "Start" command ,the manager report: "FAIL - Application at context path /myapp could not be started" . I noticed that if I put my application under {catalina.home}/webapps /ROOT directory and using http://localhost:8080/myapp/index.jsp ,it can work.But when I try to test my servlet by using http://localhost:8080/myapp/servlet/HelloWorld ,the http404 error occured again . Who can tell me how to do?