tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: httpd/Tomcat load balancing question
Date Thu, 23 Dec 2010 19:54:57 GMT
> From: Jeffrey Janner [mailto:Jeffrey.Janner@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message