I think I am having the same problem and I missed something on the 
explanations.  I am forwarding from one jsp to another as outline in my 
struts-config below.

I am running struts  1.02

My stuts-config looks like

    <!-- Registration form bean -->
    <form-bean name="registrationForm" 
type="com.eds.ARISS.struts.form.RegistrationForm" />


    <!-- Registration Form -->
    <action path="/registration"
   attribute="registrationForm"
     type="com.eds.ARISS.struts.action.RegistrationAction"
     name="registrationForm"
     scope="request"
     validate="true"
     input="/registration.jsp">
       <forward name="success" path="/index.jsp" />
    </action>



    <!-- index Form -->
    <action path="/index"
type="com.eds.ARISS.struts.action.RegistrationAction"
   attribute="registrationForm"
name="registrationForm"
scope="request"
validate="true"
input="/index.jsp">
       <forward name="success" path="/index.jsp" />
    </action>


Any my RegistrationAction is
    public ActionForward perform(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
        throws IOException, ServletException {

if (mapping.getName() != null)
{
        if ("request".equals(mapping.getScope()))
      {
        request.setAttribute(mapping.getName(), form);
      }
      else
      {
                HttpSession session = request.getSession();
                session.setAttribute(mapping.getName(), form);
      }
}


        return mapping.findForward("success");
    }




>From: "Jon.Ridgway" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: change an Actionform
>Date: Fri, 12 Jul 2002 13:47:41 +0100
>
>Hi Sven,
>
>I guess the easiest way would be to add an action property to your form 
>then
>add a <html:hidden property="action" value="search/edit"/> to your jsps.
>Then in your validate method check the value of the action property and
>validate accordingly.
>
>Jon Ridgway
>
>
>-----Original Message-----
>From: Efftinge, Sven [mailto:[EMAIL PROTECTED]]
>Sent: 12 July 2002 12:43
>To: 'Struts Users Mailing List'
>Subject: AW: change an Actionform
>
>Hi Jon,
>I did it that way, too and it worked.
>But I wanted to validate the search form and I just have one validate 
>method
>per ActionForm, and the validation in search and edit is not the same.
>
>I'm wondering about this problem because it's so fundamental.
>I mean doesn't need anybody who works with struts a solution for this?
>
>
>-----Urspr�ngliche Nachricht-----
>Von: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
>Gesendet: Freitag, 12. Juli 2002 12:40
>An: 'Struts Users Mailing List'
>Betreff: RE: change an Actionform
>
>
>Hi Sven,
>
>I do it as specified in my previous post. Although I'd use the same action
>form to store search and editing values, this way the mapping.getName () 
>bit
>in the search action would work (no hard coding of the key to use to store
>the search results in session/request for editing).
>
>Jon Ridgway
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>The contents of this email are intended only for the named addressees and
>may contain confidential and/or privileged material. If received in error
>please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
>e-mail from your system. Unauthorised review, distribution, disclosure or
>other use of this information could constitute a breach of confidence. Your
>co-operation in this matter is greatly appreciated.
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>




_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

Reply via email to