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 Android Security Essentials Live Lessons this week in the Android 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: 108

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
subject: How to read response code in a jsp
Similar Threads
Response code from GET request to jsp page
how to invoke my servlet from a third party web client
Problem regarding URLConnection
Calling an external url...and geting the response
How to submit two forms on same page?