• 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

JSP-Error Page HF Servlets &JSP Page 594

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I tried to create my own error page with the following entries:

<error-page>
<exception-type>common.exceptions.NoSSLException</exception-type>
<location>/errorPages/SSLErrorPage.jsp</location>
</error-page>


<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/errorPages/errorPage.jsp</location>
</error-page>

Now, it will be come a NoSSLException then should be display the SSLErrorPage, but I get the errorPage.jsp from Throwable.
The Head-First book (page 594) means it should be work.
What is wrong on my entries?

Thanks a lot.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lisa,
Is Your Checked Exception Class Is In WEB/classes.
 
Lisa Meyer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

yes the exception class is there, but the application worked with the throwable exception.

Can be a problem with my tomcat. I've the tomcat 5.5.4

Regards,

Lisa
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have similar problem. If I asked for non-existent page, it shows 404 not found, instead of my Custom page. I put the html files directly under context directory. Tomcat version I am using is 5.0.28. I tested the java.lang.Throwable, its working fine. Any ideas, what could have been wrong?

============== web.xml =====================
<web-app>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/Custome_Error_Page.html</location>
</error-page>

<error-page>
<error-code>404</error-code>
<location>/Custome_NotFound_Page.html</location>
</error-page>
</web-app>

=============================================
reply
    Bookmark Topic Watch Topic
  • New Topic