Look here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/default-servlet.html

If you override the mapping by putting your own reference to the default in your web.xml for the app, you should be able to map it the way you want and then have a mapping to your servlet with the / path.

Or have your Spring dispatcher catch everything and parse the path to redirect the static stuff.

Haven't tried this myself, just some thoughts.

Doug



----- Original Message ----- From: "Tim Diggins" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, May 19, 2005 7:23 AM
Subject: Re: Tomcat vs Apache



(Er, and sorry I just realised I posted __some__ of this as part of a question on the list last week, but the question I have is now posed more concretely and wasn't answered then)!

Tim Diggins wrote:
This has been a great and informative thread... I'm wondering now, how to accomplish what I want to do in Tomcat alone, rather than looking for a Tomcat+Apache solution (sounds simpler).

The issue is that I want ALL directory-like urls resolved by a particular servlet (which is a Spring dispatcher servlet, but never mind that), but I would like very few kinds of static files (which I could name explictly *.gif, *.png, *.css or put under a static place) served statically (ie by the "default" servlet.

The problem is that the url-pattern for a directory-like urls covers all urls.

Is there a way to do the reverse of normal, state that you want a particular url-pattern (e.g. "/static/*") to go to the "default servlet" , and everything else (e.g. "/*") to go to a particular servlet. If so, how do I indicate the "default servlet" in my web.xml?

(And I've already had recommendations from people to change the URLs for the dynamic stuff to something else, but that's not what the client/customer/user/design wants -- the url is very much part of the user interface in this application).

thanks

Tim




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to