By default, resin will return a 40x html page when the response status code is 40x. However, when I am an API server for ajax request, I hope the response is custom format, e.g. json, written by java. How to disable the 40x page in resin and allow everything is controled by java itself.
Asked
Active
Viewed 50 times
1 Answers
0
In the Servlet 2.4 specification,
response.sendError() and response.setStatus()
are treated differently. The former redirects you to the configured error page, but the latter still assumes that you’re going to be providing the response yourself.

lemon hungry
- 60
- 9