ActionForm gets Reset() in between the two actions
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   suhas_patwa
Posted On:   Tuesday, July 6, 2004 11:13 PM

ActionForm is getting reset values in between two actions. I have two actions(action1,action2) which are sharing the single form(actionForm1). In action1, i am setting the formValues. and when forwarded to action2 from action1,i am using the same form values. I am getting the values in action2. Problem : Sometimes i have found that i cant get setted values of actionForm in Action2. I am not getting what may be the problem,But when i searched the system logs,i have found that in action2, the sessionid is different than the action1. while in action1 and action2, i am getting session like req.getSession(false); Is there any rela   More>>

ActionForm is getting reset values in between two actions.


I have two actions(action1,action2) which are sharing the single form(actionForm1).

In action1, i am setting the formValues. and when forwarded to action2 from action1,i am using the same form values.


I am getting the values in action2.

Problem :

Sometimes i have found that i cant get setted values of actionForm in Action2.
I am not getting what may be the problem,But when i searched the system logs,i have found that in action2, the sessionid is different than the action1.



while in action1 and action2, i am getting session like

req.getSession(false);




Is there any relation of my problem with session.
like if session is expired and server has initiated new session in between the request, the form is getting reset().

Please help me out as i am totally new to struts.



Thanks in advance,
+sp
   <<Less

Re: ActionForm gets Reset() in between the two actions

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, July 8, 2004 04:38 AM

If your session expires in between two actions, ie, you haven't touched a button in like 20 minutes, your forms that exist on request/session scope are gone. Nothing to do about that except perhaps making the session-time out a little longer....

Re: ActionForm gets Reset() in between the two actions

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, July 8, 2004 04:38 AM

If your session expires in between two actions, ie, you haven't touched a button in like 20 minutes, your forms that exist on request/session scope are gone. Nothing to do about that except perhaps making the session-time out a little longer....

Re: ActionForm gets Reset() in between the two actions

Posted By:   dileep_kumar  
Posted On:   Wednesday, July 7, 2004 11:04 PM

Ur problem might be the scope of the ActionForm ur specifying.To answer it exactly i need scope of ur ActionForm.I can help u out in one way.In case if u use ActionForm in 'session' scope , no reset() will be invoked.In case of 'request' scope reset() will be invoked.

mail me with clear details if u need further clarifications at dileep_g2k@yahoo.com

Re: ActionForm gets Reset() in between the two actions

Posted By:   WarnerJan_Veldhuis  
Posted On:   Wednesday, July 7, 2004 02:40 AM

Are you testing your code with two browser windows? If so, don't.... They probably don't share the session...
About | Sitemap | Contact