Struts recursively following mapping.findForward

  • Thread starter Malcolm Dew-Jones
  • Start date
M

Malcolm Dew-Jones

Hello

I have several forms defined. Individually they work, but I am trying to
tie them together and I suspect there is something I am missing in my
understanding.

I have added a "NEXT" button to each form. The action of each form has a
"next" method that is called. That method is supposed to pass control to
the next form, and as the next form is displayed it should invoked its own
"view" method.

The problem is that invoking "next" in the first form invokes the fist
actions "next" method fine, and that finds the action servlet of the next
form ok, but then that form action has its "next" method invoked as well,
instead of starting a fresh with the "view" method.

The action config of each form has lines like the following (the next form
varies of course, it is the next form in the sequence).

<action ...
parameter="view,next">
<forward name="next" path="/path/to/next/form.do" />

Each form has an action class with a next method

public ActionForward next(...
return mapping.findForward("next");

The problem is that this doesn't start up the view method of the next
form, instead it tries to start the "next" method of the next form.

How should this be handled?

Thanks for feedback
Malcolm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top