I am running a web application with the spring framework on Tomcat. My requirement is that any request coming to the server must go to one servlet. so I made the following configuration in conf / web.xml
<error-page>
<error-code>404</error-code>
<location>/displayMsg.do</location>
</error-page>
Therefore, when a user accesses http: // myhost / xyz , request.getRequestURL () returns
http: //myhost/displayMsg.do
I think the only reason requestURL () returns this url is due to the configuration of the error page I made. Maybe because tomcat is rewriting the URL of this line.
Is it possible to get the exact url in this case? Please, help
source
share