I am using Spring MVC, and in my Controller, I am setting a standard model attribute using:
...
model.addAttribute("param", value);
...
Now, I wish to access this in a scriptlet (within a JSP). For example:
<%
Object value = ***.get***("param");
... more java code...
%>
How can I do this?
NOTE: I understand it is a BAD IDEA to use scriptlets, but please bear with it for now.
It's stored as a request attribute.
Object param = request.getAttribute("param");
Unrelated to the concrete problem, I suggest to ask a new question wherein you ask how to achieve the functional requirement without the need to fall back to legacy practices.
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