File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes errorPage directive not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "errorPage directive not working" Watch "errorPage directive not working" New topic
Author

errorPage directive not working

Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 574
    
    1

Well I have set errorPage for handling errors.But The errorPage is not showing instead I get This:
'The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.'
//badPage.jsp


//errorPage.jsp


When I remove the cause of Arithmetic exception ,the page loads.But when
the cause exists then the problem.
[ April 01, 2008: Message edited by: Bear Bibeault ]

Back to Java , again.
Sebastian Tincu
Greenhorn

Joined: Feb 21, 2007
Posts: 4
Where is your errorPage.jsp located under the web application's directory?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"siebica",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 574
    
    1

Location of errorPage.jsp is fine.The problem arrives when exception raises.
That means when I remove the line <%int x=10/0;%> then there is no problem.Error is handled by erroPage but the page does not show.
Because the Tomcat does not show divide/by zero exception.It shows when
I remove the errorPage directive.

please clarify this.

[ March 31, 2008: Message edited by: omi sharma ]

Edited : The errorPage is showing in firefox but not in IE 6.

why so?
[ March 31, 2008: Message edited by: omi sharma ]
Sebastian Tincu
Greenhorn

Joined: Feb 21, 2007
Posts: 4
It seems to be a Internet Explorer specific issue ( this is how it is behaving by default). Try disabling the "Show friendly HTTP error messages" from the Internet Explorer's advance options tab.
Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 574
    
    1

Ok boss
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: errorPage directive not working