• 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

isErrorPage = "true" has not function

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
https://coderanch.com/t/365499/Servlets/java/web-xml-error-page-not
 
Nothing up my sleeve ... and ... presto! A tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic