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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "errorPage not working properly" Watch "errorPage not working properly" New topic
Author

errorPage not working properly

sudhakar karnati
Ranch Hand

Joined: May 03, 2007
Posts: 93
Hi All,

I tried to implement errorPage attribute of the page dirtective but i am getting an error.Here is the code.

index.jsp



web.xml



errorPage.jsp



I have placed errorPage.jsp & index.jsp in the Web Pages folder.

but when i type this(http://localhost:8084/CustomTagsExample/index.jsp) in my browser.I am getting the following error:

The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.


Please help me out..

Thanks & Regards,
Sudhakar Karnati
[ July 02, 2008: Message edited by: sudhakar karnati ]
Muks Sam
Ranch Hand

Joined: Apr 09, 2004
Posts: 47

Just remove this line from Index.jsp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

and you should be ok...
sudhakar karnati
Ranch Hand

Joined: May 03, 2007
Posts: 93
Just remove this line from Index.jsp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


I removed the above tag from both the index.jsp and errorPage.jsp still i am getting the same error.

Error detaisl are:
Http 500 internal server error
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
I tried the same and get the same error.Any idea?
Ravi Singh
Greenhorn

Joined: Jun 02, 2008
Posts: 26
If you copy pasted the code
then there is problem in the first line of index.jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>

should be

<%@ page contentType="text/html" pageEncoding="UTF-8"%>

That is why it might be giving HTTP 500 error may be becuase of translation time error.

Let me know the result
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
HI Ravi, I am not using the page directive at all in my jsp , but still facing this problem, it means this might not be due that error you marked.
kamalakannan kamal
Ranch Hand

Joined: May 19, 2008
Posts: 32
Enable "Show friendly HTTP error message" option in the browser and then try. You can do this by Tools -> Internet Options -> Advanced and select Show friendly HTTP error message option.
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
HI, Finally its working ,just do this:
Tools -> Internet Options -> Advanced and select Show friendly HTTP error message option and "Uncheck this checkbox",means disable it.
Thanks Kamal.
sudhakar karnati
Ranch Hand

Joined: May 03, 2007
Posts: 93
Tools -> Internet Options -> Advanced and select Show friendly HTTP error message option and "Uncheck this checkbox",means disable it.


Thanks Anand Bhatt, Now it is working fine..

Thanks & Regards,
Sudhakar karnati
carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

But when i executed the same jsp in my system its working fine without unchecking the "show freindly http error messeges"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: errorPage not working properly