Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

isErrorPage = "true" has not function  RSS feed

 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just two jsp, one is index.jsp, and has set
<%@ page errorPage="/ShowError.jsp" %>
then in the body, I create an exception as follow
<% double a1 = Double.parseDouble("abc") ; %>

then in ShowError.jsp, I write
<%@ page isErrorPage="true" %>
then in body, I write
<%= exception.toString() %>

but the result is
HTTP 500 - Internal server error

what is the problem?
the index.jsp and ShowError.jsp is placed in the same folder!!

I am using Netbean 5.5.1 and JBoss 4.2.2, I also try to use Tomcat 5.5.17 but the result is same!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66186
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by peter tong:
the index.jsp and ShowError.jsp is placed in the same folder
That is not important. According to:the JSP ShowError.jsp should be in the root of the context.
[ June 26, 2008: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP 500 - Internal server error means nothing more than "There was a problem on the server".
Look in the tomcat/logs directory for log files with the real cause of the problem.

It could also be that you have MSIE configured to show "Friendly Error Pages". If so, everything on the JSP end could be fine.
Try disabling them.
Tools -> Options -> Advanced (tab) -> scroll down to "Show Friendly Error Messages" and uncheck that item.
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try disabling them.
Tools -> Options -> Advanced (tab) -> scroll down to "Show Friendly Error Messages" and uncheck that item.

Great!!
This can solve the problem!! now my error page can be shown!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66186
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course, remember that this only fixes it in your browser. Visitors who are using IE will still see the "helpful" "friendly" message.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Of course, remember that this only fixes it in your browser. Visitors who are using IE will still see the "helpful" "friendly" message.


See this thread for a workaround:
http://www.coderanch.com/t/365499/Servlets/java/web-xml-error-page-not
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!