Currently I use:
<% final String message = (String) request.getAttribute ("Error_Message"); %>
and then
<%= message %>
However I wonder if the same can be done with EL or JSTL instead of using a scriptlet.
Request attributes are essentially key/value pairs that are associated with a particular service request. For example, if you have a travel website that tracks the destinations of each of your customers' bookings, you can set up a destination attribute for each service request.
Each time a client requests a page, the JSP engine creates a new object to represent that request. The request object provides methods to get HTTP header information including form data, cookies, HTTP methods, etc.
EL expression:
${requestScope.Error_Message}
There are several implicit objects in JSP EL. See Expression Language under the "Implicit Objects" heading.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With