• Post Reply Bookmark Topic Watch Topic
  • New Topic

capture http response error code  RSS feed

 
Vj Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP/1.1 500 Internal Server Error
Date: Wed, 24 Jan 2007 14:58:15 GMT
Content-Length: 2100
Content-Type: text/html
Connection: Close

How can we capture the above header info from the response object.
Just want capture the status code to know the type of error.
Pls advice.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
144
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At what point? Your question is very vague.

Generally, it's best to "capture" errors by defining a servlet that handles errors in the deployment descriptor.
 
Vj Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I was bit unclear here,
Actual task is to [B]log the Status header[/B] from the response, to depict whether it is a sucess or failure.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!