You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rodrigo Arias L <pa...@flecharoja.com> on 2002/10/08 00:45:21 UTC

Problem with Struts-Velocity Validator

Hi , I´m using struts with velocity and work fine, but I configure the 
validator framework and I can get that it works.  All config is ok (like 
the examples) but I just recieved only errors.

Thanks.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with Struts-Velocity Validator

Posted by Rodrigo Arias L <pa...@flecharoja.com>.
Thanks David,
my problem is that I configure the Struts-Velocity with Validator framework 
and it seems like doesn´t works.

Assume that Struts-Velocity is Ok (running).
Then I install Validator framework like this:

1. First I add this code in web.xml:
<servlet>
    <servlet-name>validator</servlet-name>
    <servlet-class>org.apache.struts.validator.action.ValidatorServlet</servlet-class> 

    <init-param>
      <param-name>config-rules</param-name>
      <param-value>/WEB-INF/validator-rules.xml</param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/validation.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
</servlet>

2. Then, I copy the validation.xml and validator-rules.xml in /WEB-INF/ .
3. Make the changes in validation.xml to work with my form.
4. Then extend my form with 
org.apache.struts.validator.action.ValidatorForm instead of 
org.apache.struts.action.ActionForm.
5. Changes in struts-config.xml the field validate="true" and 
input="/myform.vm"

this is all that I made, but when a try to access the page, it appear, but 
all special tags of struts like message.("form.title"), etc doesn't work, 
and validation never happends.

Thanks again.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with Struts-Velocity Validator

Posted by Andrew Hill <an...@gridnode.com>.
I dont have any knowledge that might help with your problem (sorry), but if
you give some more details about these mysterious  "only errors" (and
perhaps some quick details of your configuration), it might allow someone
familiar with velocity-struts-validator usage to recognise your problem and
provide meaningful assistance.

-----Original Message-----
From: Rodrigo Arias L [mailto:pato@flecharoja.com]
Sent: Tuesday, October 08, 2002 06:45
To: struts-user@jakarta.apache.org
Subject: Problem with Struts-Velocity Validator


Hi , I´m using struts with velocity and work fine, but I configure the
validator framework and I can get that it works.  All config is ok (like
the examples) but I just recieved only errors.

Thanks.


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>