Craig R. McClanahan wrote:
On Fri, 15 Nov 2002, Trevor MacPhail wrote: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?
Date: Fri, 15 Nov 2002 19:17:18 -0800You don't want to use s servlet mapping for this. Use a welcome file
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?
instead.
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.
--
Trevor MacPhail
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
