You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Washusen <dl...@austclear.com.au> on 2003/08/12 05:32:14 UTC

displaying errors relative to a form within JSP

Afternoon all,
I'm currently trying to figure out if it is possible to display a set of
errors relative to a form within a JSP page.

I currently have a JSP page that includes two forms (Both extending
ValidatorForm).  Both of these forms contain a field named "criteria", in
both the forms this field is "required" and validated with the validator
plugin.

When the user submits one of these forms without the required "criteria"
field they are returned to the input page (containing both the forms).  I am
hoping to display the errors from the form submission above the form that
the errors are associated with.

Is this possible? And if so, how would I achieve it?

Cheers,
    Dan


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


Re: displaying errors relative to a form within JSP

Posted by Sgarlata Matt <sg...@bah.com>.
I think the easiest thing to do would be to give the fields different names,
say criteria1 and criteria2.  Perhaps not the most elegant solution, but it
should work.

Matt
----- Original Message ----- 
From: "Daniel Washusen" <dl...@austclear.com.au>
To: "Struts-User" <st...@jakarta.apache.org>
Sent: Monday, August 11, 2003 11:32 PM
Subject: displaying errors relative to a form within JSP


> Afternoon all,
> I'm currently trying to figure out if it is possible to display a set of
> errors relative to a form within a JSP page.
>
> I currently have a JSP page that includes two forms (Both extending
> ValidatorForm).  Both of these forms contain a field named "criteria", in
> both the forms this field is "required" and validated with the validator
> plugin.
>
> When the user submits one of these forms without the required "criteria"
> field they are returned to the input page (containing both the forms).  I
am
> hoping to display the errors from the form submission above the form that
> the errors are associated with.
>
> Is this possible? And if so, how would I achieve it?
>
> Cheers,
>     Dan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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