This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Tomcat and the fly likes hi vivek Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "hi vivek" Watch "hi vivek" New topic
Author

hi vivek

Nitha Don
Greenhorn

Joined: Oct 19, 2002
Posts: 3
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.
I tried in this way String statusCodeString = (String)request.getAttribute("javax.servlet.error.status_code"); but it is returning null value.
Please if you have any information email to this id
Nitha_sr@yahoo.com
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Nitha Don:

Here is the complete code,just add this to your Jsp2.jsp page
between the body tags.

Give a try.


Spritle Software Blogs
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: hi vivek
 
Similar Threads
How to get the status codes when error occurs on the web page
NTLM issue
Including page from other server !!!
Including serverpage which on other port !!!
problem setting custom header in response