As you are using validation, your action will not execute since they're
validation errors. "input" will be called back with request scoped errors.
"MyEditAction" will be called only if no validation error occurs. So you
will not have any data in request scope (only errors setted by validation
process).
If your JSP needs some datas to display back, they should be beans in
application/session scope or properties of the formbean.

Nico.

> Hmm....I was under the impression that a submit went through the action
> class specified in the type attribute which simply uses my form bean. From
> my example below that would be com.foo.bar.actions.MyEditAction. In which
> case my "test" attribute should be availble in MyEditAction.
>
> <action
> path="/myEditAction"
> type="com.foo.bar.actions.MyEditAction"
> name="myEditForm"
> input="/testform.jsp"
> validate="true">
> <forward name="success" path="/success.jsp"/>
> </action>
>
> Am I completely off and stand corrected?
>
> Vinh
>
> -----Original Message-----
> From: Nicolas De Loof [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 03, 2003 8:54 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Getting Request Parameters After validate()
>
>
> When validation send you back your request scope is empty as you have
> submited a new request ! Your "test" attribute will be present in your
> formbean, because formbean population has occured. For beeing able to
> display back your JSP you will have to use session scope beans or use
> formbean attributes.
>
> Nico.
>
>
> > All:
> >
> > I am having problems retrieving request values after submitting a form
> that
> > goes through validate().  Below is an example.  Please help!
> >
> > In the example below I have an action that shows the form using
> MyEditAction
> > with no validation (request values work fine). After submitting the form
> > ensuring a value that will cause an error I am sent back to the
> testform.jsp
> > as expected. However, none of the request attributes are available even
> > though I have the necessary values in hidden form elements, such as the
> test
> > hidden property shown below.
> >
> > struts-config:
> > <action
> > path="/myEditFormAction"
> > type="com.foo.bar.actions.MyEditAction"
> > name="myEditForm"
> > input="/testform.jsp"
> > validate="false">
> > <forward name="success" path="/success.jsp"/>
> > </action>
> >
> > <action
> > path="/myEditAction"
> > type="com.foo.bar.actions.MyEditAction"
> > name="myEditForm"
> > input="/testform.jsp"
> > validate="true">
> > <forward name="success" path="/success.jsp"/>
> > </action>
> >
> > testform.jsp:
> > <html:form action="/publisher/editTextEntity">
> > <html:hidden property="test" value="testValue"/>
> > ...
> > </html:form>
> >
> >
> > ---------------------------------------------------------------------
> > 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