It seems to me that it is less verbose than a non-Struts alternative (and
certainly not as verbose as the original email ;-)

seriously though, action mappings don't really define the usage of a form,
they define the usage of an Action class.  The way you act on that data is
what changes from action mapping to action mapping. You only define the form
once.  so I'm not sure what the complaint is.... For your "several different
actions" question, take a look at DispatchAction and RelayAction, they
should simplify your Actions for you somewhat.

also, your html:form tag doesn't need to specify the name of the form
either, it will find it via your action specification.

> -----Original Message-----
> From: Mark [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 27, 2003 10:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Is struts-config too verbose?
>
>
> Well, I left out a piece
>
> What I had a problem with was the verbosity of struts-config.xml
>
>
> For every instance of the form, i have to have a seperate, and
> almost otherwise duplicate <action> mapping.  To me, this is redundant...
>
> *********** REPLY SEPARATOR  ***********
>
> On 02/27/2003 at 9:59 PM Mark wrote:
>
> >Looking at struts-config i see an inflexible application
> skeleton that makes it hard for me to do somethings, or maybe I
> dont know how the Struts way is...Can someone enlighten me please?
> >
> >I have a Contact form.  I want to be able to reuse this contact
> form, which has standard information such as name, address, etc,
> in several places in my application.
> >
> >Looking at how action mappings work and all, the form's action
> field is constant.. Therefore, if i have this:
> >
> ><action path="/Contact/save" ..... >
> ><forward name="success" path="contact.Saved"/>
> ></action>
> >
> >in my jsp:
> >
> ><html:form name="contactForm" action="/Contact/save">
> >....
> >
> >THen inside my action class I have the code to process the form,
> and forward to the "success" forward.
> >
> >The problem i see here is, this contact form will always be
> processed by the same action servlet, and forwarded to the same
> forward.  What If I had several different scenarios that needed
> to edit/view the contact data, maybe even Different contact data
> such as User Contact, Customer Contact, etc.  So that means that
> the "save" functionality might be different, and the next page,
> the "results" might be different.
> >
> >Im befuddled how to handle this elegantly.  I want to reuse my
> views.  That should be simple shouldnt it?  I think im missing something.
> >
> >
> >Thanks in advance.
> >
> >
> >Regards,
> >Mark
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to