June 24th, 2002, 10:58 PM
404 Error With Apache Tomcat/4.0.3
We've just installed Tomcat on our server, but it doesn't seem to want to display .jsp pages. It always gives 404 Errors.
The file is definitely there. What would be causing this?
Two ways to troubleshoot:
1) Start with basic test case and see if it works.
2) Simplify the current situation and clean it up.
Take the first and second approach:
1) a. Try a totally simple hello WWW webapp in tomcat. Register a context element in server.xml
b. Once you get that to work, copy some files from your real webapp and restart Tomcat.
2) a. take a look at your current web-app.
b. Look at the doctype in your web.xml file.
Is it missing the xml declaration and/or doctype? Are all of the elements in the correct order? Do the servlet-mappings and url-patterns exist? A bad web.xml file will cause problems. Usually this problem prevents Tomcat from even starting, but I am using 4.0.2, not 4.0.3, maybe there is a difference. you can save your web.xml file as _web.xml and make a new web.xml to test. Just use an xml declaration, a doctype, and a webapp element.
Comments on this post