Hi Mark,

What is your contact.Saved action mapping ?
In forward don't give another action, simply give some jsp page.
If we need pre processing before loading the page then only you give to
another action for forward.

Thanks & Regards,
Ashok.D

----- Original Message -----
From: "Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 9:29 AM
Subject: Is struts-config too verbose?


> 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]

Reply via email to