how can i retrieve the msg from HttpServletResponse.sendError
问题 i have two tomcat servers that communicate between them. upon an error at one of the servers i would like to send an error response to the other server. i am sending the error using: resp.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage()); i am catching the response with org.apache.commons.httpclient.httpMethod. my question is how can i retrieve the e.getMessage () that i am adding to the error message? thanks 回答1: You can override the page that is sent by declaring a specific page