May be this is the basic Question. But i am not able to understand how to get it.
My browser url is http://testweb/edit.htm'.testweb is context path. This uri is from Spring. I need to get
edit.htm which is after context, in my jsp. How to get this. Thank you for the support
Thanks,
Santha/
The
HttpServletRequestoffers several methods to access (parts of) the request URL, among others theHttpServletRequest#getRequestURI()and#getServletPath().That said, this job should be done in a
Filteror maybe aServletrather than a JSP file.Update: you seem to be using Spring and rather be interested in the request URI which called the forwarded JSP. You can get it as request attribute with the key
RequestDispatcher#FORWARD_REQUEST_URIas follows:or in JSP EL as follows: