Bug 35453 - webapps/ROOT/index.jsp is shadowed by servlet
Summary: webapps/ROOT/index.jsp is shadowed by servlet
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Webapps:Examples (show other bugs)
Version: 5.5.9
Hardware: Other other
: P2 major with 2 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-21 20:12 UTC by Mark Hughes
Modified: 2005-06-21 14:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hughes 2005-06-21 20:12:29 UTC
webapps/ROOT/index.jsp is shadowed by servlet:
    <servlet>
        <servlet-name>org.apache.jsp.index_jsp</servlet-name>
        <servlet-class>org.apache.jsp.index_jsp</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>org.apache.jsp.index_jsp</servlet-name>
        <url-pattern>/index.jsp</url-pattern>
    </servlet-mapping>

This means that you can modify index.jsp but you won't see any change, because
the path "/index.jsp" is redirected in web.xml.  Me and a co-worker just lost
half an hour to this thing, trying to figure out where our redirection went.

If you're going to keep "/index.jsp" in a servlet, fine, rename the index.jsp
file to index.jsp.example.  But having it shadowed is incredibly user-hostile.
Comment 1 Mark Hughes 2005-06-21 20:41:53 UTC
Having a comment on the page is not sufficient, because typically the developer
will not even look at the default page; it will be replaced by a new index.jsp.
 If the file was only named "index.jsp.example", it wouldn't be a hazard.  As it
is, this is just obnoxious.