• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP-Error Page HF Servlets &JSP Page 594

 
Lisa Meyer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.
 
Prasad Pusapati
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Shourya Kalinga
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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>

=============================================
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic