I have a web service application that is deployed to Jboss AS and I'm running into a situation where when my application throws an error like a 401 or a 404, etc, I expect it to display the error code as well as a message that is set in my application. This is happening, but JBoss appears to be wrapping the whole thing in HTML as if it needs to be displayed in a browser.
I've found out about ErrorReportValve that it seems to be using by default that is doing this prettifying of the errors, but I'm unsure about how to disable this. If I set the errorReportValveClass property of the Host to "" then I get no error messages at all, so clearly that is not the solution. How do I get JBoss to just print out exactly what is in the errText in this method call (the call I'm using to return errors to the web service client) and not wrap it in HTML:
Edit deploy/jbossweb.sar/server.xml, search the tag Host and add the errorReportValveClass parameter:
<Host [...] errorReportValveClass="org.apache.catalina.core.StandardHostValve">