Happy thanksgiving eveyone!

I was hoping someone could give me some help with the best way to use struts
in a certain instance. In some of my web apps, there is a set of N pages
that have links to each other (in a list across the top of the page,
perhaps) and whenever you go between two of those pages, I want to perform
an action (say, for example, authorize the user, save some values they've
filled out on the page to the db, and then go to the destination page if
everything succeeds.)

I can see two ways of doing this: First, make N*(N-1) different entries in
struts-config.xml, one for each possible path between the two pages. This
seems pretty silly to me, and unworkable in the long run.

The other way is to pass in the "requested destination" as a parameter to
the action, and create an ActionForward based upon that param. This seems
like the only workable solution, but a little contrary to the struts model.

Does anyone have a better solution? Or am I just being a little too worried
about being purist? The main reason I ask is that I fear establishing a
precendent in the development group of having actions use dynamically
created ActionForwards based upon input params. In many ways, it's less
work... and I think people will use it as an "easy way out" for the short
term, negating much of the declarative value of struts in the long run.

Thanks,
-Matt


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to