"Joseph S" <j...@selectacast.net> wrote in message news:4a2da6d6.50...@selectacast.net... >I have this in the web.xml of my application: > > <servlet-mapping> > <servlet-name> > MyServlet > </servlet-name> > <url-pattern> > / > </url-pattern> > </servlet-mapping> > > > Which works fine, except for requests without pathinfo (i.e. > http://servername/ ). That still seems to be handled by the default > tomcat servlet, which is serving up the index.jsp that I no longer want to > use. Am I doing something wrong or is this a bug? >
This is a feature. Tomcat needs to process the <welcome-file-list> before doing Servlet mapping so that the correct servlet is invoked for the welcome file. > Incidentally I discovered you can't <welcome-file-list> by having an empty > element, you have to have at least one <welcome-file> in there or the > default servlet will use the one in $CATALINA_BASE/conf/web.xml . Bug or > feature? I'd say an enhancement rather than a bug, since you can always do (as you have discovered): <welcome-file-list> <welcome-file>index.doesnotexist</welcome-file> </welcome-file-list> For the benifit of the archives, this of course assumes that you have set replaceWelcomeFiles="true" in the <Context ... /> element. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org