Well I found 2 ways to assign an action's property to a JSP variable in a
scriptlet:
Solution 1: Set property as an attribute
JSP:
<%
String myProductType = request.getAttribute("prodType")
%>
This takes the action's productType property and stores it as an attribute
called prodType in the req
Does anyone know how to assign a value from to a JSP variable?
I'm trying to do something like this (I know this doesn't work):
<%
String prodType = ;
%>
We're migrating a struts 1.0.2 app to 2.1 and we have a lot of code that
used to access the ActionForm and assign values to JSP.
Thanks
2 matches
Mail list logo