I have a servlet which does some error checking and if something is wrong I will typically do this:
response.sendError(403, \"My message\")
return;
<
The scriptlet:
<%= request.getAttribute("javax.servlet.error.message") %>
can be translated to the following EL:
${requestScope['javax.servlet.error.message']}
The brace notation bean['foo.bar'] is very useful if you have dots in Map or scoped key names, because bean.foo.bar obviously doesn't return the desired Map or scoped value.