I would like to have a url structure of the form:
myplace.com/user/xxx/resource/yyy
where "user" and "resource"
are handled by individual servlets. I would like users to have the ability to POST
there username/password to /user and have it respond with their personal
url, e.g.:
/user/some-user
A "UserServlet" would be responsible to setting up the appropriate authentication,
so that they could GET/POST (assuming proper authentication) to
/user/some-user/resource
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?
I can't think of how to do this and am currently planning on using mod_rewrite
to rewrite the urls as appropriate since I have Apache 2 sitting in front of
Tomcat.
Is there perhaps a better way of handling this that I haven't considered? That
is, perhaps taking advantage of some aspect of Apache itself that I haven't thought of?
Any help in this regard would be greatly appreciated.
- Jeff