I've tried a couple of different options to re-write URLs but I seem to be failing, I'm not sure if it's cause what I'm trying to do is more complex or not...
I have this working currently in my app, calling either of these URLs, I can access my pages:
http://localhost:8080/myapp/template.jsp?site=mysite1&lng=en&pageToLoad=welcome
This could also be (note the m-)
http://localhost:8080/myapp/m-template.jsp?site=mysite1&lng=en&pageToLoad=welcome
However, I would like to re-write my URLs to look like this:
http://localhost:8080/myapp/mysite1/en/welcome
http://localhost:8080/myapp/m/mysite1/en/welcome
I have tried using JBoss's:
org.jboss.web.rewrite.RewriteValve
And now I'm attempting with:
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter
But I can't figure out how my rule in either would need to be written so that I can make this change, any suggestions would be much appreciated.
Wow, pretty much took all day, but I finally got it. There might be a way to improve, but this is what I got working and I won't be tweaking it myself till it's committed to git :)
Hope this'll be helpful to others.
Cheers.