2

If I send a HTTP status code and a message like

response.sendError(404, "message here");

how do I reference the message from the associated, error-handling JSP (marked w/ isErroPage=true)?

None of these approaches work:

Community
  • 1
  • 1
craig
  • 25,664
  • 27
  • 119
  • 205

1 Answers1

3

Answered: What is the simplest way to display httpServletResponse.sendError(403, “My Message”) status from JSTL

  • scriptlet: <%= request.getAttribute("javax.servlet.error.message") %>
  • EL: ${requestScope['javax.servlet.error.message']}
Community
  • 1
  • 1
craig
  • 25,664
  • 27
  • 119
  • 205