> From: "Justin Ruthenbeck" <[EMAIL PROTECTED]> > 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 ([EMAIL PROTECTED]) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
