I was optimistic on a first look into that URL-Rewriter

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Tuesday, June 05, 2012 1:05 PM
To: Tomcat Users List
Subject: Re: Help Linking Static Content In a WebApp before and after (6.0.30.x)

2012/6/5 Morgan, Russel <russel.mor...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


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

Reply via email to