Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

errorPage not working properly

 
sudhakar karnati
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
Java MyEclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried the same and get the same error.Any idea?
 
Ravi Singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But when i executed the same jsp in my system its working fine without unchecking the "show freindly http error messeges"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic