You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2009/04/08 22:07:11 UTC
what is the equivalent of method in struts 2 for retrieve data?
in struts 1, i saved the data into session
session.setAttribute(BeanNames.PARTS_LIST,partsList);
then, in the jsp file, retrieve the data by
<logic:iterate id="plist" name="partslist" scope="session" type="neuco.PartForm">
what is the equivalent method in struts 2?
tks in advance
john
Re: what is the equivalent of method in struts 2 for retrieve data?
Posted by 马 召 <am...@gmail.com>.
Request Scope
1. add a property in action
2. then use it in jsp
Session Scope
1. Action implement SessionAware interface
2. set value to session map
3. then use it in jsp
2009/4/9 john lee <sh...@yahoo.com>:
> in struts 1, i saved the data into session
> session.setAttribute(BeanNames.PARTS_LIST,partsList);
> then, in the jsp file, retrieve the data by
> <logic:iterate id="plist" name="partslist" scope="session" type="neuco.PartForm">
>
> what is the equivalent method in struts 2?
>
> tks in advance
>
> john
>
>
>
--
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
PMP Candidate,
SAP ABAP PA
MaZhao@GOOGLE
Phone: 86-0411-84832530
Cell Phone: 15904966851
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: what is the equivalent of method in struts 2 for retrieve data?
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Struts 1 and Struts 2 are quite different in philosophy. I would
recommend that you go through the Struts 2 tutorials/guides, which
will give you an introduction to the concepts of the framework:
http://struts.apache.org/2.1.6/docs/home.html
Nils-H
On Wed, Apr 8, 2009 at 10:07 PM, john lee <sh...@yahoo.com> wrote:
> in struts 1, i saved the data into session
> session.setAttribute(BeanNames.PARTS_LIST,partsList);
> then, in the jsp file, retrieve the data by
> <logic:iterate id="plist" name="partslist" scope="session" type="neuco.PartForm">
>
> what is the equivalent method in struts 2?
>
> tks in advance
>
> john
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: what is the equivalent of method in struts 2 for retrieve data?
Posted by Muthu Velappan <mu...@aspiresys.com>.
Have u checked this http://struts.apache.org/2.0.14/docs/iterator.html
~Muthu
-----Original Message-----
From: john lee [mailto:sh_thorn_bird@yahoo.com]
Sent: Thursday, April 09, 2009 1:37 AM
To: user@struts.apache.org
Subject: what is the equivalent of method in struts 2 for retrieve data?
in struts 1, i saved the data into session
session.setAttribute(BeanNames.PARTS_LIST,partsList);
then, in the jsp file, retrieve the data by
<logic:iterate id="plist" name="partslist" scope="session"
type="neuco.PartForm">
what is the equivalent method in struts 2?
tks in advance
john
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org