I have a REST based webservice that was originally deployed to WebSphere and errors were being returned properly as we expected (HTTP Status code plus a text message in the response body of the details of the error). But once deployed to JBoss, those text error messages became wrapped in HTML by JBoss, I'm assuming because we don't have any error-page definitions in our web.xml (why would we in a webservice application?).
How do I get around this? There should be a straightforward way to tell JBoss to stop trying to "pretty up" my error messages. Please help. Need a solution.