"Trevor MacPhail" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Craig R. McClanahan wrote: > > >On Fri, 15 Nov 2002, Trevor MacPhail wrote: > > > > > > > >>Date: Fri, 15 Nov 2002 19:17:18 -0800 > >>From: Trevor MacPhail <[EMAIL PROTECTED]> > >>Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > >>To: Tomcat Users List <[EMAIL PROTECTED]> > >>Subject: Servlet Mapping to / > >> > >>How can I set up a servlet-mapping to map a specific servlet to > >>http://host:port/ but still have it available that any static file > >>without a maping can be accessed still? > >> > >>I tried the following: > >> > >><servlet-mapping> > >><servlet-name>HomePage</servlet-name> > >><url-pattern>/</url-pattern> > >></servlet-mapping> > >> > >>but this causes anything that doesnt already have a mapping to be > >>interpreted as the HomePage servlet. Which means I cant have my servlets > >>refering to static files such as http://host:port/images/something.jpg. > >> > >>What url-pattern should I use to get it to allow only / in the mapping? > >> > >> > >> > > > >You don't want to use s servlet mapping for this. Use a welcome file > >instead. > > > > > > Ok, then the question I have now is, how do I set up a welcome-file to > be a servlet instead of a static file? > > I've tried <welcome-file>HomePage</welcome-file> but that didnt work. > > I've also tried <welcome-file>index.html</welcome-file> combined with: > <servlet-mapping> > <servlet-name>HomePage</servlet-name> > <url-pattern>/index.html</url-pattern> > </servlet-mapping> > > but that didnt work either.
Well, yes, this only works at the moment in 5.0 & 3.3.2-dev (and the later needs non-default options set). My guess is that unless someone wants to get involved and push this (with patches), this will never be supported on the 4.x line. I don't want to sound negative, but the nature of OS projects is that someone has to care enough to change it, unless it is a clear bug. In the 2.3 Servlet-Spec (changed in the 2.4 spec, which 5.0 is based on), this is not a clear bug. > > -- > Trevor MacPhail -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
