• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Problem in Configuring Error Page

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Christophe,

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

Thanks once again..

Regards
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic