• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Configuring Error Page

 
Maneessh saxena
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Great Ranchers ,

I am facing problem in getting error page configured. I am trying to configure error page in the web.xml but I am getting � HTTP 500 Internal Server Error � instead of error page as expected. I�ve placed these Jsps at proper place. In the Errorpage.jsp the sop is getting printed but Errorpage is not getting displayed because of 505 Error.

Related files are given below �..

---------------------------------------------------------------------------
In web.xml
<web-app>
��.
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/Errorpage.jsp</location>
</error-page>
���
</web-app>
---------------------------------------------------------------------------
TestError.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<% int x = 10/0; %>
</body>
</html>
---------------------------------------------------------------------------Errorpage.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<% System.out.println("This Is getting printed On console ......"); %>
<% out.println("But This's not getting printed on page as page is
not displated beacuse of 505 Error....."); %>

</body>
</html>



Please let me know where I am doing a mistake �

Thanks & Regards
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using IE, be careful to check out the "Show Friendly error messages".
 
Maneessh saxena
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christophe,

Thanks for your suggestion. I tried it and my problem is solved..

Thanks once again..

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic