This shouldn't be too hard to solve. Post the associated <servlet> and <servlet-mapping> from your web.xml -the one under webapps/study.



On Friday, November 29, 2002, at 05:53 PM, Steve R. Burrus wrote:

Hello David Brown, I am getting the very same 404 server error msg. when I try to run/execute a VERY BASIC JSP, for the current date and time!!! I need some special guidance from u re. how to edit the web.xml file to set the context variable!! And, would you also tell me how to write the and the settings in the server.xml file?!

**********************************************************************

On Thu 11/28, David Brown wrote:From: David Brown [mailto: [EMAIL PROTECTED]]To: [EMAIL PROTECTED]: Thu, 28 Nov 2002 12:49:01 -0500Subject: Re: How to add a servlet to a new WebappCurley, Thomas writes:

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



4. just copied the examples web.xml to study/WEB-INF and added the following lines




TestServlet


com.wrox.projsp.ch03.TestServlet




TestServlet
/TestServlet



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:
For additional commands, e-mail:


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//WEB-INF/web.xml
and
$CATALINA_HOME/webapps//classes//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:
For additional commands, e-mail:



_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

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

Reply via email to