I am looking in to using Struts as the development framework for generating
pages.  I have two questions:

1. How can I submit two different actions for the same form?
2. How can I submit a form using an image and html link instead of a submit
button.

Some elaboration for each question is in order lest I be misunderstood.

Question 1: How can I submit two different actions for the same form?
I'll use a somewhat contrived example to make my point.  Assume that the
page with the form contains user profile information.  The two actions that
are desired from this page are "Save Changes to existing profile" and
"Create new profile using data in form."  Each action needs to be mapped to
a completely different Action class.  Any information about how this can be
done is greatly appreciated. In previous environments I usually accomplished
this with a little bit of javascript and a hidden input variable combined
with the fact that I wrote the controlling servlet.

Question 2: How can I submit a form using an image and html link instead of
a submit button.
REASON: Business user can't stand the look of the generic submit button and
wants an image that matches the site in general.  No chance in h--l that I
can change their mind.  Got any good ideas?

Please let me know if I have made to many assumptions and need to add some
more information to clarify any of the two questions.

Thanks in advance,
Andreas

Reply via email to