This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSP and the fly likes How to read response code in a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to read response code in a jsp" Watch "How to read response code in a jsp" New topic

How to read response code in a jsp

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 118

I am sending a request to a third party url (application) from my jsp page and I need to resubmit the request to that url once again if my internet connection is down or the third party server is down or page not found error. I want to sumit that request basing on the response code. BUt I am not getting idea how to read the response code.

Can anyone help in this or any other way to achieve this task.

Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Raaja ,

If you are using Servlet 3.0 then you have a method inside the HttpServletResponse that returns the status of the response .

Muhammad Saif Asif Mirza
I agree. Here's the link:
subject: How to read response code in a jsp
It's not a secret anymore!