aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes badPage.jsp - HFSJ pg 458 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "badPage.jsp - HFSJ pg 458" Watch "badPage.jsp - HFSJ pg 458" New topic
Author

badPage.jsp - HFSJ pg 458

Mukunthan Shanmuganathan
Ranch Hand

Joined: Jul 24, 2007
Posts: 32
Dear Guys!

In order to check the Error Page I tried the example given in the HFSJ pg. 458. Without an error in the badPage.jsp and errorPage.jsp are working fine.

But, When I put <% int x = 10/0; %> and run, I get the "The Page Cannot be displayed - HTTP 500 internal Server Error" instead of my own errorPage.jsp.

Why? and How can I get the errorPage.jsp displayed?

Thank you.



:roll:


Dare to know!
Tarun Yadav
Ranch Hand

Joined: Sep 20, 2007
Posts: 134
Did you set <%@ page errorPage="errorPage.jsp" %> ?
Mukunthan Shanmuganathan
Ranch Hand

Joined: Jul 24, 2007
Posts: 32
Dear Tarun Yadav,

Yes I did.

for your convenience I put my code here!

-------------------------------------------

<%@ page errorPage="errorPage.jsp"%>
<html><body>
About to be bad...
<% int x = 10/0; %>
</body></html>

-------------------------------------------

<%@ page isErrorPage="true"%>

<html><body>
<strong>Bummer</strong>
</body></html>

Thank You!
Mukunthan Shanmuganathan
Ranch Hand

Joined: Jul 24, 2007
Posts: 32
Guys!

Can any body sort this out? Please

Thank You!

Tarun Yadav
Ranch Hand

Joined: Sep 20, 2007
Posts: 134
The code is absolutely fine. There must be something else that's wrong. Can you post the complete stack trace please?

Also, make sure it's not this cause: http://faq.javaranch.com/java/ErrorPageInIe
Mukunthan Shanmuganathan
Ranch Hand

Joined: Jul 24, 2007
Posts: 32
Dear Tarun Yadav,

You are right.

I had to Turn off the friendly error message option in the browser.

It is working.

Thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: badPage.jsp - HFSJ pg 458