开发者

JBoss default HTML errors and REST webservice application

开发者 https://www.devze.com 2022-12-27 16:02 出处:网络
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 bod

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.


possibly try making sure your content type is not text/html, just send plaintext

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号