• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

custom 404 error page

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Our system uses apache and tomcat on linux boxes. Does anyone know how to configure tomcat to use a custom 404 error page? I can get a custom page (via apache) when someone enters a bad .html URL, but would like to have a custom page for when someone enters a bad .jsp URL.
THanks
 
Don Arnett
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
fingered it out. In the WEB-INF/web.xml file for each context, add the following
<error-page>
<error-code>
404
</error-code>
<location>
/jsp/errorPage404.jsp
</location>
</error-page>

the file entry (/jsp/errorPage404.jsp) must start with a / and is relative to the context home directory.
reply
    Bookmark Topic Watch Topic
  • New Topic