Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using a JSP page as 404 Handler  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!