404 after adding web.xml

2008-11-12 Thread Shoan Motwani
I am a java noob. Been trying out the examples from Oreilly's Head
First Servlets  JSP.

I am using Tomcat 5.5 running on Mac Os X 10.5.

I created webapps/Beer-v1 and dropped in a plain html file. On
accessing it at http://localhost:8080/Beer-v1/form.html, I get the
html page as expected. But after adding webapp/WEB-INF/web.xml
containing the following, I don't get anything other than a 404.



web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

servlet
servlet-nameCh3 Beer/servlet-name
servlet-classcom.shoan.web.BeerSelect/servlet-class
/servlet

servlet-mapping
servlet-nameCh3 Beer/servlet-name
url-pattern/SelectBeer.do/url-pattern
servlet-mapping
/web-app
___


The error I get is


HTTP Status 404 -

type Status report

message

description The requested resource () is not available.
Apache Tomcat/5.5.27

Please help.

Thanks in advance.

Peace,
Shoan.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 404 after adding web.xml

2008-11-12 Thread Caldarale, Charles R
 From: Shoan Motwani [mailto:[EMAIL PROTECTED]
 Subject: 404 after adding web.xml

 But after adding webapp/WEB-INF/web.xml containing the
 following, I don't get anything other than a 404.

Look in the Tomcat logs for error messages about deployment of your webapp.

 servlet-mapping
 servlet-nameCh3 Beer/servlet-name
 url-pattern/SelectBeer.do/url-pattern
 servlet-mapping

The last line above should be /servlet-mapping.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 404 after adding web.xml

2008-11-12 Thread Shoan Motwani
On Thu, Nov 13, 2008 at 9:14 AM, Caldarale, Charles R
[EMAIL PROTECTED] wrote:
 From: Shoan Motwani [mailto:[EMAIL PROTECTED]
 Subject: 404 after adding web.xml

 But after adding webapp/WEB-INF/web.xml containing the
 following, I don't get anything other than a 404.

 Look in the Tomcat logs for error messages about deployment of your webapp.

 servlet-mapping
 servlet-nameCh3 Beer/servlet-name
 url-pattern/SelectBeer.do/url-pattern
 servlet-mapping

 The last line above should be /servlet-mapping.

That did it. Thanks.

Peace,
Shoan.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]