• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in web.xml for error-page

 
Kathiresan Chinnasamy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I have a problem with 500 error.
According to my project . if i get 500 or 404 error it should forword to error.jsp.

I found the solution in our forum.

Refer this link
http://www.coderanch.com/t/365499/Servlets/java/web-xml-error-page-not

Here i have to change the browser setting but i want to forward it without browser dependent
please help me..

thanks in advance
Kathiresan.c
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error page forward is always browser independent.
Did you face the same problem?
If yes then in the same thread Ben has given a way to make it browser independent using a very different approach.
[ November 06, 2008: Message edited by: Amit Ghorpade ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want the browser to display your error page, always, regardless of the 'friendly error page' setting, you need to send a response code of 200 with your error page.

Try adding this to the top of your error page:


Note:
A 200 error code means that everything went OK and that there are no problems so doing this means that your not really adhering to the HTTP protocol.
 
Kathiresan Chinnasamy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Amit Ghorpade and Ben Souther

I got the solution
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kathiresan Chinnasamy:
Thank you Amit Ghorpade and Ben Souther

I got the solution


You are welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic