Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Response Headers

 
srinath anand
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Is there any way for me to get back the HTTP Response Headers using the J2EE framework in the format as given below ? I have a Filter which gets me the Request headers but I want to get the corresponding Response Headers also. Can it be done ?

HTTP/1.1 200 OK
Date: Mon, 19 Oct 2004 22:12:57 GMT
Pragma: no-cache
Server: WebLogic WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
Content-Length: 297
Content-Type: text/html
Expires: Thu, 01 Dec 2004 16:00:00 GMT
Set-Cookie: SessionID=null; path=/
Set-Cookie:
JSESSIONID=O1mD6qo4DcTRQPV3IuQFKR2TBiANadyyzQG2WqsRLOuyPjIABhPQ!1713637281!-
1073741567!7001!7002; path=/
Cache-Control: no-cache, post-check=0, pre-check=0


Thanks
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to extract the headers to use in your code or you just want to see them? You can attach some tools to intercept the HTTP Request/Response if it is just for debugging.
 
srinath anand
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to see them.
I am printing out the request headers right now but I want the corresponding response headers sent by the server to the request headers.

Thanks
 
subho saha
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a software available for free called Http Look.You can use it to track the request response headers. The url to download it is "http://www.httpsniffer.com/".
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is your best bet LIveHttpHeaders. Its a firefox extension.
 
srinath anand
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies. But I am using IE. Basically I am trying to track a JSESSIONID which is being lost somewhere. Thus I have to do it programatically.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try 'ethereal', which is a protocol analyzer allowing you not just to look at HTTP messages but loads of other stuff (TCP/ICMP/IPX). Of course, you can filter out those you don't want to see.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic