I had quite a bit of experience developing Struts 1 app, now I am learning doing Struts 2 app and not quite clear about how to set object onto Valuestack from action level
let's say I have an Object type Employee in Action
if this was for Struts 1, than I would do
to access it in JSP (struts 1) with employee's firstname
but how do I do that with Struts 2? what syntax do I need to issue in Action class to push employee onto ValueStack?
that would have similar as
The action itself is pushed onto the stack: the canonical way to expose values to the view side is to just make them action properties.
You might want to check out any of a number of web resources regarding S2 basics; this is covered on the S2 documentation wiki, many tutorials, etc.
Davie Lin
Ranch Hand
Joined: Aug 05, 2007
Posts: 294
posted
0
Thanks Mr. Newton, I figure what you describe is what's actually going on. I have Sturts 2 in Action and I didn't see anything on how to push properties on to Value Stack. So that means what you said must be true and I just need to try it out in JSP
You don't *have* to push values onto the value stack, that's what I'm saying. Struts 2 in Action covers exposing properties to the JSP all over the place; keep reading!