How do I monitor HTTP communication in Eclipse?
Author: Deron Eriksson
Description: This tutorial shows how to use the TCP/IP Monitor view in Eclipse.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 1.5.1 || Tomcat 5.5.20


Page:    1 2 >

EclipseSW has a TCP/IP Monitor view that comes in very handy if you're interested in watching the HTTP communication between a browser and your web application. Basically, it listens on a port on your machine where Eclipse is running, and it forwards that request on to a destination host and port. TomcatSW typically runs on port 8080 when I fire up a project on my local machine, so I have the TCP/IP Monitor listen on port 8081 and forward the request to port 8080 of the localhost. By listening to 8081 and forwarding to 8080, the TCP/IP Monitor grabs and displays the requests going to the server and the responses coming back from the server. It can display headers, which can be very useful when trying to track down difficult issues with web application. It is also very useful if you ever need to do analyze something like SOAP communication.

If you have the Eclipse Web Tools, you should have the TCP/IP Monitor view, which can be found at Window → Show View → Other.

selecting view to show

I selected the TCP/IP Monitor view and clicked OK.

selecting TCP/IP Monitor view

This brought up the monitor view. I checked the 'Show Header' option and then clicked 'Properties'.

TCP/IP Monitor view

I clicked 'Add' to add a new monitor.

adding a new monitor

I set the monitor up to listen on port 8081 and to send requests to 8081 to localhost:8080.

set monitor to listen on port 8081 and forward requests to localhost:8080

I clicked 'Start' to start the port 8081 monitor.

start monitor on port 8081

I clicked OK to return.

click OK

(Continued on page 2)

Page:    1 2 >