Ken Fox wrote:
chuck.caldar...@unisys.com wrote:

If you place the standard rewrite filter in the ROOT context, you can catch
any requests that do not directly map to the appropriate webapp and forward
or redirect them appropriately.


I looked at UrlRewriteFilter and it seemed designed for forwarding within a
context, not between contexts. Can it forward from ROOT to a context loaded
by a Host finding the app in its appBase? I don't have Context declarations
for my apps and I'd really like to maintain isolation between them.

The advantage of doing context mapping in a Valve is that the context switch
can happen very early in the request and before any host-specific code runs.
I'm not concerned about portability--this is a very small amount of code and
it's fine to rewrite it entirely if I switch containers.

Just suggesting other scenarios here.
You could also run Tomcat behind a front-end Apache httpd, and let the front-end do the rewriting before forwarding to Tomcat. This could have the advantage, should the load on your site become heavier, to also use the one front-end with several back-end Tomcats, whether load-balancing between them or just splitting the sites. The other advantage is that you do not need to write any code. URL-rewriting and proxying are already part of the standard Apache httpd. And, this is a configuration already used at tens of thousands of sites, so one could say that the relevant code is pretty stable.
And it would remain perfectly portable.




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

Reply via email to