You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Reynolds <ji...@gmail.com> on 2005/11/03 15:52:51 UTC

struts-validator.tld question

I want to try and use some client-side validation on a project. I have used
the server-side quite a bit in the past. Anyway, I found an example of how
this would work, and the first thing it shows is a taglib include like so:
 '<%@taglib uri="/tags/struts-validator" prefix="validator" %>'
  Anyway, I have build all my projects from the "blank" struts war file, and
do not see any validator.tld file anywhere. I am unsure of exactly what I am
looking for here. Could someone give me some guidance on this?

Re: struts-validator.tld question

Posted by Yujun Liang <yu...@acm.org>.
Please check web.xml

<taglib>
<taglib-uri>/tags/struts-validator</taglib-uri>
<taglib-location>?????</taglib-location>
</taglib>

Good luck

On 11/4/05, Jim Reynolds <ji...@gmail.com> wrote:
>
> I want to try and use some client-side validation on a project. I have
> used
> the server-side quite a bit in the past. Anyway, I found an example of how
> this would work, and the first thing it shows is a taglib include like so:
> '<%@taglib uri="/tags/struts-validator" prefix="validator" %>'
> Anyway, I have build all my projects from the "blank" struts war file, and
> do not see any validator.tld file anywhere. I am unsure of exactly what I
> am
> looking for here. Could someone give me some guidance on this?
>
>


--
Yujun Liang
yujun.liang@acm.org

Re: struts-validator.tld question

Posted by Laurie Harper <la...@holoweb.net>.
Jim Reynolds wrote:
> I want to try and use some client-side validation on a project. I have used
> the server-side quite a bit in the past. Anyway, I found an example of how
> this would work, and the first thing it shows is a taglib include like so:
>  '<%@taglib uri="/tags/struts-validator" prefix="validator" %>'
>   Anyway, I have build all my projects from the "blank" struts war file, and
> do not see any validator.tld file anywhere. I am unsure of exactly what I am
> looking for here. Could someone give me some guidance on this?

I don't know what example you were looking at, but as far as I know 
there is no taglib or TLD file for client-side validation. You just need 
to include the <html:javascript> tag (and add an onsubit handler to your 
<html:form>).

See the tag documentation [1], referenced from the main validator 
documentation [2], for details.

L.

[1] 
http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#javascript
[2] http://struts.apache.org/struts-doc-1.2.x/userGuide/dev_validator.html


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