getPathInfo « Request « JSP-Servlet Q&A





1. How come request.getPathInfo() in service method returns null?    stackoverflow.com

I wrote Front Controller Pattern and ran the test. Somehow request.getPathInfo() is returning null when it should return the path info. 1. HTML that calls servlet

<a href="tmp.do">Test link to invoke cool servlet</a>
2. ...

2. request.getPathInfo()    coderanch.com

hi mike, i observed the same thing. the reason it doesn't work is i guess as follows, -the JSP file gets converted into a servlet in the backend when requested for the first time and then that servlet is used to serve future requests -the servlet name given to the JSP's generated servlet is webserver specific -the getPathInfo() works ONLY when ...