This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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


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
Author

How to read response code in a jsp

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 115
Hi,

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.

Thanks
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
OCJA(5/6) OCJP(6) OCJWCD(6)
 
Have you checked out Aspose?
 
subject: How to read response code in a jsp
 
It's not a secret anymore!