A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Frameworks
»
Struts
Author
how to get the setter and getter value in strut2
pankaj semwal
Ranch Hand
Joined: Oct 07, 2008
Posts: 300
posted
Mar 21, 2009 06:22:51
0
Hi,
I am using strut2.
In my action class i generate the setter and generate method of a variable.
How can i get that value in the jsp page of that value.
Please help
Thanks
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
2
I like...
posted
Mar 21, 2009 07:01:02
0
Well if there is a javabean property in your action class, then it will directly go into the value stack and you can use it using the
struts
tag
<s:property value="propertyName"/>
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
|
SCWCD Links
pankaj semwal
Ranch Hand
Joined: Oct 07, 2008
Posts: 300
posted
Mar 21, 2009 07:09:48
0
Hi Ankit ,
I try this but did not work.
Thanks
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
I like...
posted
Mar 21, 2009 07:18:56
0
Action has:
public String getFoo() { return foo; }
JSP
has:
<s:property value="foo"/> <%-- Or, if using JSP 2.0 container... --%> ${foo}
I agree. Here's the link:
http://aspose.com/file-tools
subject: how to get the setter and getter value in strut2
Similar Threads
how to get the cookie value in strut2
how to iterate map in strut2
Downlaod in Strut2
how to encode the url in strut2
Strut2 exception handling
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter