I'm trying to send plain text error messages from a tomcat servlet, so that the responses may be presented to the user by the application.
I have the following in my web.xml:
<error-page>
<error-code>409</error-code>
<location>/string_error.jsp</location>
</error-page>
And string_error.jsp is the following:
${requestScope['javax.servlet.error.message']}
This successfully gives me plain-text error messages for a 409 response. However, I would like to use this same page for any error in the 400/500 range, without manually specifying a new <error-page>
block for each one. I would have assumed that <error-code>*</error-code>
would accomplish this, but it does not. Does Tomcat provide a mechanism to do this?