On 4/18/07, Hassan Schroeder <[EMAIL PROTECTED]> wrote:
On 4/18/07, Guilhem SEMPERE <[EMAIL PROTECTED]> wrote:

> Now I need access to the originally requested URL (the one which
> couldn't be found).  I couldn't find a way to do this.

The Servlet Spec is your friend -- SRV 8.4.2, specifically :-)


No, none of the methods listed under SRV 8.4.2 show the referring URL
information, also
the Referer header is null.

Put these in 404.jsp

<%=request.getRequestURI()%><br/> Shows the URL of the 404 page and
not the page that sent it to the 404 page.

<%=request.getContextPath()%><br/>
<%=request.getServletPath()%><br/>
<%=request.getPathInfo()%><br/>
<%=request.getQueryString()%><br/>

The referer header is null
<%=request.getHeader("referer")%>

Hmm... there really doesn't seem to be a way to get the URL of the
page that caused the 404 error, inside the 404.jsp page --- probably
possible with a Filter.

Also AccessLogValve captures all URLs.


-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to