How to Suppress StackTrace in Jax-RPC
In this post, we will remove or edit bea_fault:stacktrace. First of all, we ll put filter class in web.xml <filter> <filter-name>ExceptionHandler</filter-name> <filter-class>xxxPackage.ExceptionHandler</filter-class> </filter> <filter-mapping> <filter-name>ExceptionHandler</filter-name> <url-pattern>*</url-pattern> </filter-mapping> Then, this class welcome all url pattern and apply filter. This class must be implemented javax.servlet.Filter. In below, we posted doFilter method. You can edit stack trace message whatever you want. By the way,Be careful about java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream() . (If you get an error, just leave a comment! ) Thanks. ...