Fiddler grabs the local HTTP request message of the Java application

1. Listen to Tomcat's http request message

Add a line in catalina.bat (the value of proxyPort is the fiddler port number)

set CATALINA_OPTS=-Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888

2. Monitor in Java program

Set the proxy in the Java code in the following way

System.setProperty("http.proxyHost", "localhost"); 
System.setProperty("http.proxyPort", "8888"); 
System.setProperty("https.proxyHost", "localhost");
System.setProperty("https.proxyPort", "8888");

https://stackoverflow.com/questions/8549749/how-to-capture-https-with-fiddler-in-java

Guess you like

Origin blog.51cto.com/dengshuangfu/2553026