2012/6/5 Morgan, Russel <Russel.Morgan@disney.com>:
> Thanks yes that is the change that caused this issue with how we use static content.
>
> I am not sure how I mangled my formatting but I went through and cleaned it up, I hope
that helps readability.
>
> Russ
>
>
> Issue formatting recap below:
> =========================
> Tomcat Users:
>
> Has anyone found a graceful way to handle static content linking that works both pre
and post the the following change?
> https://issues.apache.org/bugzilla/show_bug.cgi?id=50026
>
> We have quite a few customers on earlier versions of Tomcat 6 as well as new customers
picking up later versions that are post this patch. I am looking for some kind of work around
that works in both generations.
>
> Here is an example of what we are doing as far as static linking in our webapp.
>
> So on older tomcat's (prior to 6.0.30)
> http://localhost:8080/cms/default/css/gopublish.css
> http://localhost:8080/cms/static/css/gopublish.css
> both work to hit items in the root of the webapp so .../cms(as webapp)/css/gopublish.css
>
> (...)
>
> I don't see that this problem can be worked around by servlet mapping or filters, since
the core behavior has changed.
Have you looked at UrlRewriteFilter, that I mentioned in my response
to the first e-mail? A link to it can be found here:
http://wiki.apache.org/tomcat/AddOns
Your configuration could be something like this:
[[[
<urlrewrite>
<rule>
<from casesensitive="true">^/static/(.+)</from>
<to>/$1</to>
</rule>
<rule>
<from casesensitive="true">^/default/(.+)</from>
<to>/$1</to>
</rule>
</urlrewrite>
]]]
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|