• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

How to See the HTTP Message Exchange between browser and Tomcat?

 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am studying Servlet and JSP programming. I am using Tomcat in win98. Is
there anyway I can tap the normal HTTP message exchanged between IE and
Tomcat? (for studying purpose e.g. to tell how cookie is used for session
management)

Thx for your advice.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If by taping you mean to see the information received at Browser and the information posted to Container, then it is simple, see the header information using methods in HttpServletRequest at Container end. And like wise before committing response inspect header inromation using methods in HttpServletResponse. The first case will show you what browser sent and secondly what container sent to browser.

You may use console to print that info.
getHeader("Header-name"); etc etc.
 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know you said IE, but I've found using Firefox as a browser has made it much easier to look at request response stuff from the browser prespective as well.
If you install it in custom mode & get the developer tools you can use HttpHeaders to get a clearer picture of what happens in the handshake process etc.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx for your answer.

I've got a solution - although a bit sophisticated. I setup another machine to run tomcat and use Ethereal (a protocol analyzer) to monitor the http specific packets passed thru my ethernet card.

Cheers
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lee,
Beter than etheral u can also use JPcapDumper its fully java based packaet analyzer same like etheral(it internaly uses same etheral dll files)

The source code also available. U can customize ur capturing packets.
 
reply
    Bookmark Topic Watch Topic
  • New Topic