I start Tomcat using startup.bat in the TOMCAT_HOME \ bin directory.
I need to enable all java debug traces.
In my web application (Note: this is actually axis2 web service). I did:
System.setProperty("javax.net.debug","all");
But that did not work. Nothing is printed on the Tomcat console.
I tried to put this property as a parameter in Tomcat at startup, so I edited the catalina.bat file as follows:
Before:
if not "%LOGGING_MANAGER%" == "" goto noJuliManager set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager :noJuliManager set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
After:
if not "%LOGGING_MANAGER%" == "" goto noJuliManager set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager :noJuliManager set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER% set JAVA_OPTS=-Djavax.net.debug=all %JAVA_OPTS%
Iβm not sure if this is the place to record it in catalina.bat, but it seemed reasonable to me.
There was no success.
So how can I start tomcat with the -Djava option?
In particular, how can I enable
System.setProperty("javax.net.debug","all"); so what can i do debugging in my web application?
Thanks.
source share