> From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
> Subject: RE: httpd/Tomcat load balancing question

>     <servlet-mapping>
>         <servlet-name>default</servlet-name>
>         <url-pattern>/static/*</url-pattern>
>     </servlet-mapping>

> This is supposed to send anything that comes in as /static/ to the 
> default servlet for Tomcat to serve directly

It does.

> But the directory structure is:
>    Webapps
>      -- Portal
>           --images
>           --scripts
>           --WEB-INF
> How does the default servlet know to serve /Portal/static/images/logo.jpg
> (after c:url encoding) from the images directory above

Because the DefaultServlet in the version of Tomcat you're using assumes that 
the only <url-pattern> it's mapped to is "/*" - and simply discards the 
"/static" part of the URL.  Starting with Tomcat 7.0.3, the "/static" will no 
longer be ignored.  See the following for details:

https://issues.apache.org/bugzilla/show_bug.cgi?id=50026

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to