JSPs not working with web.xml
I installed Tomcat 5.5 and the jsps won't show (are not found) when I use my web.xml file with all the appropriate listings and mappings. When I remove the web.xml file the jsps work again. I don't really feel comfortable showing the contents of the web.xml file (besides I know it's right since it worked with a previous version of Tomcat and nothing about it has changed). Has anyone else ever encountered a problem like this before? If there is a chance that there's a spelling error or something with a mapping....would that still affect a jsp (even index.jsp) file that has nothing to do the web file. I find it strange that the jsps will load when there is no web.xml file present. Thanks in advance for any help.
[730 byte] By [
uberallesa] at [2007-11-27 2:53:30]

# 1
Does it give an error message when you try to access those JSPs?
Are the JSPs precompiled or do you actually specify the JSP file in web.xml?
Would it be possible to show an example snippet of what you have in web.xml - just a standard servlet/jsp definition? Nothing specific, just the basic shape of what you have there.
I am expecting it looks something like this (specifying a classname):
<servlet>
<servlet-name>MyJSPPage</servlet-name>
<servlet-class>com.mypackage.MyJSPPage</servlet-class>
</servlet>
or like this with a JSP file:
<servlet>
<servlet-name>MyJSPPage</servlet-name>
<jsp-file>myJspPage.jsp</jsp-file>
</servlet>
and then you do a servlet-mapping:
<servlet-mapping>
<servlet-name>MyJSPPage</servlet-name>
<url-pattern>/myJSPPage.jsp</url-pattern>
</servlet-mapping>
# 2
I've never had to 'register' a jsp page in a web.xml file before. I did create a small testing webapp with a simple jsp page and a simple servlet and if I left a spelling error in the web.xml file it will not load the jsp page (says it cannot find that resource) and after I took the mistake out the page loaded just fine but I still have the problem with 'locating' the serlvet itself.
As I'm sure it has become evident....I'm still fairly new to Tomcat.
Here is the web.xml file contents for the testing app:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Testing site</display-name>
<description>
This is a testing site
</description>
<servlet>
<servlet-name>Test1</servlet-name>
<servlet-class>Test1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
Test1
</servlet-name>
<url-pattern>
/servlet/Test1
</url-pattern>
</servlet-mapping>
</web-app>
I can run the servlet examples already placed in Tomcat and I don't see any real difference in their web.xml (except for the additions of such things as filters and listeners which don't really concern me).
I also read that I don't need to add anything to my classpath with Tomcat 5.5. Could that also be a problem? Thanks again in advance.