File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to read response code in a jsp
It's not a secret anymore!