Pregunta

http://foo.com/webapp/abcServlet?id=123 Need this url to be sent like below. http://foo.com/webapp/abcServlet/id/123

I can achieve passing parameters through post methods but i want a clean url. How to do this in jsp/tomcat. Servlet 3

¿Fue útil?

Solución

This looks promising: http://tuckey.org/urlrewrite/manual/3.0/guide.html

From the documentation:

Clean a URL

<rule>
    <from>^/products/([0-9]+)$</from>
    <to>/products/index.jsp?product_id=$1</to>
</rule>

e.g. /products/1234 will be passed on to /products/index.jsp?product_id=1234 without the user noticing.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top