Infeligo
Infeligo

Reputation: 11802

How to capture HTTP(S) traffic from and to a Java web application with Fiddler2 or similar tool?

I want to capture data that my web application sends and receives from a CAS server via HTTPS. I tried using Fiddler2, but couldn't make it capture traffic from Java web application. It seems I need to configure it to use Fiddler2 as a proxy. How do I do it correctly?

Some additional info. I have already imported Fiddler's certificate with keytool. Running web application on Tomcat 7. Using IntelliJ Idea.

Upvotes: 11

Views: 13849

Answers (3)

Jean Lestang
Jean Lestang

Reputation: 861

You can also use directly the settings screen: "File / Settings...", then choose"IDE Settings / HTTP Proxy". Then tick "Use proxy", "Host name": localhost, "Port number": 8888

Upvotes: 2

Tarlog
Tarlog

Reputation: 10154

In addition to Piskvor answer, make sure you configure Fiddler to capture the HTTPS traffic: Tools --> Fiddler Options --> HTTPS --> Capture HTTPS CONNECTs

Upvotes: 4

Piskvor left the building
Piskvor left the building

Reputation: 92752

Run the JVM with these parameters:

-Dhttps.proxyHost=yourhostwithfiddler -Dhttps.proxyPort=8888

Alternately, you could set the Java default proxy through a GUI - see http://www.java.com/en/download/help/proxy_setup.xml

Upvotes: 9

Related Questions