Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action Switching problem

 
Raj Chukka
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got two action classes (say A1 and A2) and two form beans (F1 and F2).
Iam populating F2 in A1 and transferring the control to A2 (which has mapping to F2). But iam getting all "null" values.

How should i retain the values in form F2 when switching the class???

struts-config.xml is listed below.

<action path="/A1.do" name="F1" scope="session" type="A1">
<forward name="OK" path="/A2.do" redirect="true"/>
</action>

<action path="/A2.do" name="F2" scope="session" type="A2">
<forward name="Success" path="/success.jsp/>
</action>

Thanks in advance.

Thanks,
Raj Chukka
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are not populating the F2 instance in A1 beacause it does not exist yet. This is why you are getting null values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic