aspose file tools*
The moose likes Struts and the fly likes Action Switching problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action Switching problem " Watch "Action Switching problem " New topic
Author

Action Switching problem

Raj Chukka
Greenhorn

Joined: Apr 09, 2007
Posts: 22
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

Joined: Apr 16, 2008
Posts: 2187
You are not populating the F2 instance in A1 beacause it does not exist yet. This is why you are getting null values.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action Switching problem