struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohan Radhakrishnan <Moh...@hclcomnet.co.in>
Subject RE: Return to same JSP
Date Thu, 07 Nov 2002 13:25:52 GMT
Hi,
   That is what I meant in my first mail. Like the following

1. Look up an ActionMapping.
2. If the ActionMapping has an ActionForm specified, it instantiates (or 
retrieves from session scope) the ActionForm and populates it based 
on the request.
3. If the ActionMapping specifies validate, Struts calls the 
ActionForm's validate method.
4. If validate returns a non-zero-length ActionErrors object, Struts 
forwards control to the ActionMapping's specified "input" path rather 
than forwarding control to the action class associated with the 
mapping

Thanks,
Mohan

-----Original Message-----
From: Homer, Christopher [mailto:Christopher.Homer@ds-s.com]
Sent: Thursday, November 07, 2002 6:30 PM
To: 'Struts Users Mailing List'
Subject: RE: Return to same JSP


providing you perform the validation in your ActionForm method:

public ActionErrors validate (ActionMapping mapping, HttpServletRequest
request)
{
	// stuff
}

-----Original Message-----
From: Mohan Radhakrishnan [mailto:MohanR@hclcomnet.co.in]
Sent: 07 November 2002 12:59
To: 'Struts Users Mailing List'
Subject: RE: Return to same JSP


Hi,
   Thanks. I though it was automatic ?
bye,
Mohan

-----Original Message-----
From: Max Kutny [mailto:mkut@umc.com.ua]
Sent: Thursday, November 07, 2002 6:13 PM
To: Struts Users Mailing List
Subject: Re: Return to same JSP



 MR> Hi, If I return a non-empty ActionError from my validate method,
 MR> struts should return to the same JSP. This will happen if I specify
 MR> the input parameter for the action mapping.

 MR> Is this right ? It doesn't seem to work that way. Am I missing
 MR> something ?

You should use
return new ActionForward(mapping.getInput());

-- 
Max Kutny

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message