my dog learned polymorphism*
The moose likes Tomcat and the fly likes 404 after adding web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "404 after adding web.xml" Watch "404 after adding web.xml" New topic
Author

404 after adding web.xml

Shoan Motwani
Greenhorn

Joined: Nov 12, 2008
Posts: 2
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.



The error I get is
Allahbaksh Asadullah
Greenhorn

Joined: Aug 30, 2007
Posts: 9
Hi,
Please check your log files which are there in tomcat/logs.

There will be appropriate error message.

Regards,
Allahbaksh
htttp://allahbaksh.blogspot.com
Allahbaksh Asadullah
Greenhorn

Joined: Aug 30, 2007
Posts: 9
Hi,
Please note that a tag is not properly closed in the web.xml

<url-pattern>/SelectBeer.do</url-pattern>
<servlet-mapping>

</servlet-mapping>
 
 
subject: 404 after adding web.xml
 
Similar Threads
HFSJ-Mini MVC doubt
MVC tutorial Head First
Getting problem with post method
requested resource cannot be found.
Tomcat 5.5 - application development