tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <wi...@msoft.com>
Subject Re: Servlet Mapping Strategy w/ user-specific URLs
Date Wed, 08 Jan 2003 22:07:15 GMT
> From: "Justin Ruthenbeck" <justinr@nextengine.com>
> Sent: Wednesday, January 08, 2003 12:40 PM
> Subject: Re: Servlet Mapping Strategy w/ user-specific URLs

> There's no way to accomplish what you're shooting for using only the
> mappings in the web.xml.  However, you could pretty easily do it through a
> filter running on requests to "/user/*".  If you do this, you could
forward
> any requests that match URI "/user" to your UserServlet and anything that
> matches "/user/*/resource/*" to your ResourceServlet by parsing the URI
> String in your own code.

Yeah, Servlet Filters can be considered the "mod_rewrite" of Java Servlets,
if perhaps less easily "configurable", as it requires code.

Also, they're limited compared to mod_rewrite in that Filter more or less
"get in the way" of the request, whereas mod_rewrite really has the
capability of transforming the ultimate destination of the request.

It's still a completely valid technique, and also portable (so your app
could work "without change" on IIS for example) compared to the mod_rewrite
solution, but I can appreciate the light frustration in having to "preempt"
the default processing within the web.xml.

It's also good to understand the distinctions between the two techniques.

Regards,

Will Hartung
(willh@msoft.com)




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message