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

tomcat 5 and error page

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi all:
When I used tomcat 5, I meet a wierd problem.
What I wanna do is to direct all errors to one shared error page. I don't like to add
a directive <%@ page errorPage="xxx" %>, so I add an error page entry in web.xml.
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.jsp</location>
</error-page>
The error.jsp has a directive <%@ page isErrorPage="true" %>
But it doesn't work.
I also tried the error status code:
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
It doesn't work either.
Can anyone give an idea?
Thanks.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Make sure you are throwing that exception or any exception derived from it. Also verify that IE is not set to show friendly http error msgs. Tools->Internet Options->Advanced. "Show friendly http error messages" should not be checked.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
We have duplicate conversations happening.
Please don't post the same question in multiple forums, it wastes the time of the pople trying to help you.
Anyone who wants to help should see the copy here.
thanks,
Dave.
 
    Bookmark Topic Watch Topic
  • New Topic