This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Using a JSP page as 404 Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Using a JSP page as 404 Handler" Watch "Using a JSP page as 404 Handler" New topic
Author

Using a JSP page as 404 Handler

Mike Little
Greenhorn

Joined: Mar 23, 2002
Posts: 1
I'm trying to use a JSP page as a 404 handler but I'm having a problem detecting which page was requested.
My setup is both Tomcat 3.2.3. standalone (on port 8080) and Apache with mod_jk.
I've configured the 404 handler in web.xml and also
in Apache's httpd.conf and my JSP page gets called
correctly when I reference a non-existant page (e.g. http://localhost/zzz.html or http://localhost:8080/zzz.html)
My problem is that I am unable to find out that zzz.html was the requested page. I wish to log bad links amongst other things.
I seem to remember that back when I did some cgi with perl, the HTTP_REFERRER environment variable held the original page requested.
Any ideas how to do this in a JSP page?
Any help or pointers will be appreciated.
Thanks in advance,
Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using a JSP page as 404 Handler
 
Similar Threads
creating user accounts
Problem launching a jsp page with eclipse and tomcat
I did a search, but apparently this has never happened before:
Running JBuilder8 with Jakarta Tomcat: can't view the Tomcat Admin application
Configuration problem