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!

clean URLs with JSP/Servlet

843838May 5 2006 — edited May 7 2006
Hello. I've found some information on how to setup clean URLs for php, but none for JSP/servlet. Hopefully some one can help. Here's what I mean by 'clean URL':

http://mydomain/employee.jsp?employeeID=1232

becomes

http://mydomain/employee/1232

And, in that second example, the container would dispatch all requests for /employee* to some JSP/servlet. I don't care if the 'clean URL' has to have an extension or not (e.g. mydomain/employee.jsp/1232) although I would prefer to also remove the JSP extension.

Additionally (if some one has experience with this need): how do I then access the final part of the URL supplied by the client? In other words, how would 1232 be available to the destination JSP/servlet? Does the container convert it into a parameter, i.e.:

1) client sends request for "mydomain/employee/1232"
2) container delegates request to "mydomain/employee.jsp?1232"

Finally (sorry about the length), I don't have access to top-level config files for this site (it's personal use, although I'm pretty familiar with java APIs from my job), so, ideally, I'd like a .htaccess level solution, where the container can just re-route to a JSP.

If any one has some suggestions, I'd GREATLY appreciate it. Thanks for your time. Take care.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2006
Added on May 5 2006
3 comments
239 views