struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Recover property's value of bean from jsp
Date Thu, 18 Dec 2008 12:25:36 GMT
> Into prepare method, I put in request scope a class bean. 
> If in my jsp (into form) I can recover the property's value 
> with a s:textfield, but how to recover this value without
> s:textfield?
> <s:property value="WHAT_I_HAVE_TO_PUT_HERE"/>

As Nils said the "Struts 2 way" would be to expose the bean as an action property rather than
putting it into the request scope.

If you *really* want to retrieve something from the request scope, though, why not just use
plain old JSP EL? (You can actually access S2 action properties via JSP EL as well, thanks
to S2's request wrapper.)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message