Yes, I use spring. I will describe question in details: 

Same situation
my1.html -(mypojo.id)-> action1.save -(mypojo)-> action2.edit-(mypojo)->
my2.jsp -> my2.html

action1 loads mypojo:

class action1 {
 ..
 private mypojo;
 setMypojo()..
 getMyPojo()
...
 public String save () {
    mypojo = mymanager.loadMyPojo();
   return SUCCESS;
 }
}

then on action1 success defined:    
      <result name="success" type="redirect-action">action2</result>

action2.edit executed and it does not load mypojo. 

action2.edit returns SUCCESS result passed to jsp:             
     <result name="input">/WEB-INF/pages/my2.jsp</result>


Can action2.edit see mypojo loaded by action1.save?
      Will struts2 call action2.setMypojo and pass pojo from action1 to
action2?
Can my2.jsp see mypojo loaded by action1.save?
     Does pojo stays in request scope?

Thanks. 


Jiang, Jane (NIH/NCI) [C] wrote:
> 
> If you use the Spring framework, you can define your object as Spring
> beans and have them injected to your action.  
> 
> -----Original Message-----
> From: ros [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 04, 2007 10:21 AM
> To: user@struts.apache.org
> Subject: how to keep object from action to action
> 
> 
> Hi!
> 
> I use struts2 and want to load object in action1 and then access in in
> action2 and result jsp, like on drawing
> 
> my1.html -(myobject.id)-> action1.save -(myobject)-> action2.edit
> -(myobject)-> my2.jsp -> my2.html
> 
> I do not want to load this object in action2.edit if it was already
> loaded
> in action1.save. 
> 
> Can struts2 pass objects from action to action?  
> 
> Thanks.
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/how-to-keep-object-from-action-to-action-tf4569127
> .html#a13040888
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-keep-object-from-action-to-action-tf4569127.html#a13042482
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to