I am part of a team that is replacing a cocoon application with spring mvc. We have to keep the URL format for the application the same as the current system.
The URLs are http://www.site.com/customername. We are currently mapping everything to one DispatcherServlet. The problem is static content like images at the url http://www.site.com/images get mapped to the DispatcherServlet also rather than the images directory in the root of the webapp. We could add in a servlet mapping for each of the customernames but this would become configuration hell. So I wanted to do something like map requests that are not equal to images, css, js etc to the DispatcherServlet. Has anyone any ideas if this is possible? The current solution uses apache URL rewriting and only forwards requests for non static to tomcat. I just wanted to be able to deploy everything in one place. Ben On 10/27/06, Rick Fisk <[EMAIL PROTECTED]> wrote:
Have you tried using getServletContext()? (http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletC ontext.html) We use this as a means to find and match our properties (stored in a common property container directory by context) since we deploy multiple instances of the same app for different customers. This allows us to deploy for a new customer merely by adding a properties directory for the customer and re-naming the war file to match this. At startup, we ask for our context, look up our properties and then assume that all url mapping will direct to /<CONTEXT>/ Is this even relevant to your question? :-) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ben short Sent: Friday, October 27, 2006 8:35 AM To: Tomcat Users List Subject: Tomcat 5.5 Regular Expression as servlet-mapping url-pattern Hi is it possible to use a regular expression as a servlet-mappings url-pattern? Ben --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]