I have a Error404Servlet which is configured as error-page for 404 in web.xml:
<servlet>
<servlet-name>Error404</servlet-name>
<servlet-class>com.foo.bar.Error404Servlet</servlet-class>
</servlet>
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
In this servlet i have to log the original url that caused 404, but request.getRequestURI() always returns "/error404"
How can i get the original url? The unly ugly method i know is to create filter that puts the original url to request attribute.