dont change anything in struts_config.xml.
write your validation in action itself instead of writing in validation.xml
for your Form.
like,
if(id == null){
request.setAttribute("error","errors.id.notexist");
}
try this, let me the result pls.
with regards
vasu
Quoting Martin Ravell <[EMAIL PROTECTED]>:
> Thanks for the post Vasumathi
>
> I don't quite follow what you are saying however.
>
> Since I use Tiles with my struts the page that contains my form is produced
> by an Action executing (I use an Action which extends DispatchAction).
>
> If the Validation fails (there are fields that do not meet their
> validations
> rules) I need to go back to what is in the 'input' option of the action
> element.
>
> As far as I can work out this needs to be a jsp.
>
> It cannot however be a jsp since it is my Action that ties me into a tiles
> definition which produces the form.
>
> I've tried putting thigns like '/activate.do?method=init' into the input
> option of the action element but this refuses to work.
>
> Any ideas?
>
>
> Regards
> Marty
>
>
> -----Original Message-----
> From: Vasumathi [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 24 January 2006 4:44 PM
> To: Struts Users Mailing List
> Subject: Re: Struts, Tiles and the Validator
>
> Hi
> you try like this in struts_config.xml and tiles_sam.xml file.
>
> <action path="/Sample" name="sampleForm" scope="request"
> type="controller.admin.action.SampleAction" validate="true"
> input="/admin/icf/sample.jsp">
> <forward name="failure" path="/admin/icf/sample.jsp"
> </action>
>
>
> in tiles for this sample.jsp
>
> <definition name="sample.icf" extends="base.project.admin" >
> <put name="header" value="heading" />
> <put name="header_detail" value="Sample" />
> <put name="menu" value="/admin/template/menu_blank.jsp" />
> <put name="body" value="/admin/icf/sample.jsp" />
> <put name="footer" value="Status: Sample page"/>
> </definition>
>
> this may help u....
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]