JAXWS disabling exception stack trace

This post is just a tip on how to stop displaying those ugly stack trace errors in productions when working with JAXWS implementations.

This would help your end point's exception messages look much more cleaner.

All you need to do is to add this VM argument to your start up script.



The way you start your server might be different depending on what type of servlet container you are using.

We embed tomcat 6 in our child care attendance tracking application and we use our own start up script.

I would just discribe how you can add this to tomcat 6 if your application is deployed the normal way which is to have your application within tomcat.

Tomcat uses the catalina.sh or catalina.bat to start up the container depending on your deployment environment.

Tomcat 6 uses a VM argument to enable its logging in this file.

The logging functionality in this file is enabled with the JAVA_OPTS variable.

You can look for the JAVA_OPTS variable in this file to see how you can add a VM argument to tomcat 6. In fact, you can add the VM argument to the JAVA_OPTS variable.

This would work just fine.

I hope this would help someone out there looking to enable this feature in their application.

Add new comment