No, it's not. There are several problems with it. The main one is that the execute method in two.java is expecting the mapping and form objects to be those defined for the two action. Instead, in this case they are the mapping and form for the one action.
Originally posted by Suresh Kumar Ramasamy: If not, what are the better ways?
Yes, there are better ways. Here are two possibilities:
Method 1: Refactor the code that prepares for two into a method in a Controller Helper or Controller Utility class. Example: ControllerUtils.prepareTwo(). You can then call this method from either the one or two actions.
Method 2: Create both a preparatory and an execution action for each page. Then create a forward for the page one execution action that forwards to the preparatory action for page two. Example:
[ March 18, 2008: Message edited by: Merrill Higginson ]