Inspecting http traffic from the java code

Enonic version: 6.11.1
OS: Windows 8.1

I’m adding a custom header to all http calls originating from the java code. I don’t have access to the receiving end so I’m trying to inspect the traffic with Fiddler. Fiddler needs some variables added to the JVM for it to show the calls originating from the java code.

-DproxyPort=8888<path\to\FiddlerKeystore><Keystore Password>

I’ve tried adding it to server.bat, but can’t get it to work. Am I looking in the wrong place? Is there a better way to do this?

I’m not sure the trustStore parameters will work, but for the proxy try with these: 

I’ve tried adding it to the end of the execute step in server.bat:

"%JAVA_EXE%" %JAVA_OPTS% -Dxp.install="%XP_INSTALL%" -Dfile.encoding=UTF8 %XP_OPTS% -classpath "%XP_INSTALL%\lib\*" com.enonic.xp.launcher.LauncherMain %ARGS% -Dhttps.proxyHost= -Dhttps.proxyPort=8888 -Dhttp.proxyHost= -Dhttp.proxyPort=8888

Is this the correct place to put it? It does not seem to have any effect.

I think in Windows you can do this before executing server.bat:

set -Dhttps.proxyHost= -Dhttps.proxyPort=8888 -Dhttp.proxyHost= -Dhttps.proxyPort=8888

Or add the line at the beginning of the bat file.

1 Like

When I try this I get an error:

Error: Could not find or load main class

Is there something else that should be added somewhere?

There was a typo in my message, there is a dash missing before the first D. Should be like this:

set -Dhttps.proxyHost= -Dhttps.proxyPort=8888 -Dhttp.proxyHost= -Dhttps.proxyPort=8888

1 Like