Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to read response code in a jsp

 
Raaja Gotluru
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raaja ,

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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic