Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to configure web.xml for a servlet with dynamic URL?

843842Sep 23 2008 — edited Sep 23 2008
Hi, all.

Does any one know how to configure <servlet-mapping> for dynamic URLs?

For example, I wish to have a single servlet handle requests with URLs like

- www.myapp.com/user0/servlet?...
- www.myapp.com/user1/servlet?...

where "user0, user1" are user IDs and "servlet" refers to the single servlet.
And, hopefully, I can hide the web app's context name.

Is this possible with servlets and web.xml?
If so, it would be a great help to let me know of it.

Thanks in advance.

Edited by: mjkhan21 on Sep 22, 2008 11:59 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2008
Added on Sep 23 2008
1 comment
424 views