| Author |
Struts:How to pass value from action class to jsp?
|
Vic Hood
Ranch Hand
Joined: Jan 05, 2011
Posts: 477
|
|
Hi ,
how do I pass a field obtained from my struts action class , to the jsp ?
In this program , i obtain a parameter from the front end(jsp) and pass it to the action class to perform certain calculations and pass back the result . How do I access this new value from my front end?
Im new to struts so dont know if its a simple doubt .
Thanks in advance.
|
Learning and Learning!-- Java all the way!
|
 |
shwetank sharma
Greenhorn
Joined: Jan 09, 2011
Posts: 10
|
|
Hi,
Suppose your new value is like
In jsp access your new value like
I hope it help..
Cheers..
Shwetank
|
~~Cheers~~
Shwetank
|
 |
Vic Hood
Ranch Hand
Joined: Jan 05, 2011
Posts: 477
|
|
shwetank sharma wrote:Hi,
Suppose your new value is like
In jsp access your new value like
Hi . I'm using struts 1.4 could you please explain with respect to that ?
Thanks
|
 |
shwetank sharma
Greenhorn
Joined: Jan 09, 2011
Posts: 10
|
|
Hi,
Yes that was how it is implemented in struts 2.
In struts 1.x you have to do it like this..
In your form bean
On jsp you can display it like..
Where "formName" is name of Form bean.
Hope it helps..
Thanks
|
 |
 |
|
|
subject: Struts:How to pass value from action class to jsp?
|
|
|