clean URLs with JSP/Servlet
843838May 5 2006 — edited May 7 2006Hello. 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.