Problem using jsp to handle 404s from nonjsps

2004-06-25 Thread Joseph Shraibman
I have a 404.jsp for logging broken links.  I get the missing page by 
doing this:

String url =  request.getRequestURL().toString();
This works when the missing page is a jsp.  When it is something else 
like a .html, my url variable ends up with the url to my 404 handler.  I 
assume this is a problem with apache forwarding to 404.jsp.  How can I 
work around this?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Problem using jsp to handle 404s from nonjsps

2004-06-25 Thread Akash Jauhar
Assuming that you have an apache in front of tomcat configure apache to
specify that 404.jsp is your custom page for handling 404 errors for
content that is served by apache. This should help you log all broken
links as well as missing images and other content

Hope this helps

Apache directive that needs to be modified is as follows

ErrorDocument 404 /cgi-bin/error404.cgi or /404.jsp




Akash



-Original Message-
From: Joseph Shraibman [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 25, 2004 11:39 AM
To: Tomcat Users List
Subject: Problem using jsp to handle 404s from nonjsps 


I have a 404.jsp for logging broken links.  I get the missing page by 
doing this:

String url =  request.getRequestURL().toString();

This works when the missing page is a jsp.  When it is something else 
like a .html, my url variable ends up with the url to my 404 handler.  I

assume this is a problem with apache forwarding to 404.jsp.  How can I 
work around this?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem using jsp to handle 404s from nonjsps

2004-06-25 Thread Joseph Shraibman
Akash Jauhar wrote:
Assuming that you have an apache in front of tomcat configure apache to
specify that 404.jsp is your custom page for handling 404 errors for
content that is served by apache. This should help you log all broken
links as well as missing images and other content
Hope this helps
Apache directive that needs to be modified is as follows
ErrorDocument 404 /cgi-bin/error404.cgi or /404.jsp

Right, I already do that.  My problem is in the jsp that 
request.getRequestURL().toString() returns 404.jsp and not the page that 
the user requested.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]