Hi All,
Using Tomcat 4.1.12 on Win 2K
I am getting a 404 error when I try to create a new webapp and add a very basic servlet. The servlet works if I create the package structure within the examples WEB-INF/classes. Here are the steps:
1. created webapps/study
2. created .../study/WEB-INF/classes/com/wrox/projsp/ch03/TestServlet.java and compiled [ok]
3. added the following line to server.xml after the examples </Context>
<Context path="/study" docBase="study" debug="0" >
</Context>
4. just copied the examples web.xml to study/WEB-INF and added the following lines
<servlet>
<servlet-name>
TestServlet
</servlet-name>
<servlet-class>
com.wrox.projsp.ch03.TestServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
5. restart tomcat
RESULT - The requested resource (/study/servlet/TestServlet) is not available.
Can anyone see what I am missing ?
thanks
Thomas
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
Hello Thomas, i see this all the time on this ml. i don't know what folks' fascination is w/ server.xml and a basic application. yes, this is working 4 u because web.xml is already defined for the webapp "/examples". look closer at how the tc folks do it, namely, using the ant build and allowing tc to do its job by creating a .war/.jar combo and letting the tc server (when bounced, autoreload or using the webapp "/manager") expand the .war into its very own: $CATALINA_HOME/webapps/<ur_application_context>/WEB-INF/web.xml and $CATALINA_HOME/webapps/<ur_application_context>/classes/<package_path...>/So meServletUbuild.class. pls allow me recommend u look into ant and build.xml. it's worth the trouble if u r serious about tc learning and dev. trying to build anything structured by hand is not recommended. even seasoned vets don't do this because they r the ones that invented this stuff. using ide's r ok (especially when employers require ide use) but i use 3 or 4 tc tools to develop anything i want w/ ease because the chore of structured compilation and deployment is pretty much automatic. hope this help, david.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
