Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the status codes when error occurs on the web page

 
Nitha Don
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page jsp1.jsp. If the jsp1.jsp get any error then it will call
Jsp2.jsp, which is a standard customized error page.
I want to get the error status code of the web page and I want to display it in customized way like in Text area.
For ex
If the error is
500 Internal server error � then I want that 500 number i.e. Error Status code
Ex 403 � forbidden
Here status code is 403
I am able to track rest of the exception details.
How to get the status code of the static page which came or coming from web server.
I am using apache tomcat 4.0.4.
Please if you have any information email to this id
Nitha_sr@yahoo.com
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
you can do it through your web.xml file.
use
<error-page>
<error-code></error-code>
<location></location>
</error-page>
you have to make a page for every type of error.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!