I. Introduction to tcpmon
Tcpmon is a project under Apache, download link: http://ws.apache.org/commons/tcpmon/download.cgi
Tcpmon is equivalent to a transfer station. It can set the receiving port and the target port;
Function: intercept and view the HTTP request and HTTP information between the customer and the service;
Ii. tcpmon Application
There is a Web Service published on http: // localhost: 9876, that is, Port = 9876, IP = 127.0.0.1;
Generally, if the client wants to request web services, it must set the port number to 9876. However, if tcpmon is available, the client can set the port number to 8080, As long as tcpmon can be set as follows:
In this way, tcpmon can listen to port 8080, display the HTTP request on the interface after receiving it, then send the request to port 9876, and listen again to the HTTP Response sent back from Port 9876, and displayed on the interface;
The effect is as follows: