I am starting Tomcat using the startup.bat in the TOMCAT_HOME\bin directory.
I need to enable all the java's debugging traces.
In my web app (Note: Actually it is an axis2 web service) I did:System.setProperty("javax.net.debug","all");
But it did not work.
Nothing printed to Tomcat console.
I tried to put this property as parameter in Tomcat on start-up so I edited the catalina.bat 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 am not sure if this is the write place to put it in catalina.bat, but it seemed reasonable to me.
No success as well.
So how can I start tomcat with a -Djava option?
Specifically how can I enable
System.setProperty("javax.net.debug","all");
so that I can do the debugging in my web app?
Thank you.
The "official" way to set extra parameters to Tomcat is via creating bin/catalina.sh
in Unix or bin\catalina.bat
in Windows. In your (Windows) case, the file should look like as follows:
set CATALINA_OPTS=%CATALINA_OPTS% -Djavax.net.debug=all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With