Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple errorPage question

 
Ner min
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can't gat my errorPage to be shown when exception happen? using tomcat 5.0.28
in my web.xml i have
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/isErrorPage.jsp</location>
</error-page>

my error page

<%@ page isErrorPage="true"%>
<html><body>
! u coused the ${page.Context.exception}
<%=exception.getMessage()%>
</body></html>

and in my norty-code:

<%if (true){throw new RuntimeException("!!!");}%>


i allways geting my standard blanko 500-Page

HTTP 500 - Internal server error
Internet Explorer
 
Esam Ahmed
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ner,
Could you try to make your error page named just ErrorPage.jsp
isErrorPage is page attribute...just being standard.

And get rid of that scriptlet for now,
try not to mix up scriptlet and EL ..
The purpose of EL is to get rid of that scriptlet eventually...

Anyway..
Here:


Can you make it ${pageContext.exeption}

Esam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic