tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <>
Subject RE: Servlet Mapping Strategy w/ user-specific URLs
Date Thu, 09 Jan 2003 02:34:15 GMT

> Is it possible to setup a servlet mapping such that a UserServlet handles
> requests to /user/xxx, but a ResourceServlet handles requests to
> /user/xxx/resource/yyy?

Easy enough to do with mod_rewrite, as you have planned since you have
apache as a front end, or you could write a Servlet Filter.  Which would you
rather do: declare some simple RewriteRules, or write, test and debug a new
Servlet Filter?

> There certainly is some overlap between those services as outlined in the
> Servlet spec, and the functionality provided by Apache itself.  Are there
> any general rules of thumb for when to use the services of Apache vs.
> in these areas? Or at least some good resources that go into these issues?

Depends upon your point of view.  Mine is different from those I've seen in
reply to your inquiry so far.  If I can do something declaratively in
Apache, I do it.  If I am going to write code, I put do it in Tomcat.

Apache is a world-class web server.  Tomcat is an application (Servlet/JSP)
engine.  Tomcat has a relatively weak but effective web server.  Using
Tomcat as a web server is like street racing with a Mack truck.  On the
other hand, try towing a motor home with a Lamborghini.

	--- Noel

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message