Validator question

Hi,

on my website, when a user try to authenticate, I check if the field "password" was correctly entered :
when he enters a password length smaller then 6 cars, he get an error like
"need more then 6 cars"
then if he has a password of 6 or more, I checked for the carachters, see if there are no special cars in it.
if he entered special cars I display something like
"password invalid"
This was all possible for me without Struts.

Since I moved to Struts,
I try to implement the Validator framework.
But how can I do something basic like what I had without Struts.

In my validation.xml (need to be corrected) :

<form-validation>
      <global>
            <constant>
                  <constant-name>password_length</constant-name>
                  <constant-value>^(\.{6,})$</constant-value>
            </constant>
            <constant>
                  <constant-name>password_cars</constant-name>
                  <constant-value>^(w+)$</constant-value>
            </constant>
      </global>
      
      <formset>
            <form name="authenticationForm">
                  <field      property="password"
                                    depends="required,mask">
                                    <arg0 key="invalid.password_length"/>
                                    <var>
                                          <var-name> mask</var-name>
                                          <var-value>${password_length}</var-value>
                                    </var>
                  </field>
                  <field      property="password"
                                    depends="required,mask">
                                    <arg0 key="invalid.password_cars"/>
                                    <var>
                                          <var-name> mask</var-name>
                                          <var-value>${password_cars}</var-value>
                                    </var>
                  </field>
            </form>
      </formset>


Can someone help me ?
And I need to be sure to not display the cars message if length message is displayed.
LVL 9
matthew016Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jaggernatConnect With a Mentor Commented:
<action
            path="/Login"
            type="controllers.submits.LoginAction"
            name="loginForm"
            scope="request">
</action>


You have to give validate=true and input="your present page".
:(



0
 
jaggernatCommented:
use maxlength rule for length validation . something like

<field property="field name" depends="integer,maxlength">
              <arg0 key="field mustbe an integer"/>  //key in applicationreources.properties file
              <arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
              <var><var-name>maxlength</var-name><var-value>6</var-value></var>
 </field>


make sure you have

errors.integer={0} must be an integer.
errors.maxlength={0} can not be greater than {1} characters.

in applicationresources.properties file , other wise error wont be displayed.


Also, avoid duplicate entries , like you have repeated <field     property="password" .. twice.
just have it defined once and apply all the rules to that field, like this


 <field     property="password"
                depends="required,maxlength,mask">
                <arg0 key="password.required"/> //have a message for password required in applResources.properties file
                    <arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
              <var><var-name>maxlength</var-name><var-value>6</var-value></var>
 <msg name="mask" key="invalidcharacters.Message"/>
<!-- have a message for invalid characters in password (in applResources.properties file) -->
   <var>
   <var-name>mask</var-name>
   <var-value>${password_cars}</var-value>
   </var>


 </field>

the above rules will take care of required, maxlength and invalid chars

that should help
0
 
matthew016Author Commented:
I will try jaggernat, thank you
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
matthew016Author Commented:
Dear jaggernat,

your code compile with dtd 1_1_3
but not with the latest dtd 1_3_0
0
 
matthew016Author Commented:
Anyway I tried with 1_1_3 and I have this error :
org.xml.sax.SAXParseException: Element type "arg0" must be declared.
0
 
jaggernatCommented:
not sure why thats hapenning.
did you put  password.required  in applicationresources.properties file ?


try without mask first and see if it works
 
<field     property="password"
                depends="required,maxlength">
                <arg0 key="password.required"/> //have a message for password required in applResources.properties file
                    <arg1 name="maxlength" key="${var:maxlength}" resource="false"/>
                    <var>
                    <var-name>maxlength</var-name>
                   <var-value>6</var-value>
                   </var>

 </field>

dont forget to build your project and restart the server.
0
 
matthew016Author Commented:
Dear jaggernat,

I made it more simple to test :

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE form-validation PUBLIC
     "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
     "http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">
<form-validation>
      <formset>
            <form name="loginForm">
                <field property="login" depends="required">
                    <arg key="required.login"/>
                </field>
            </form>
      </formset>
</form-validation>


I have the following result :
***************************************************
GRAVE: No such validation method: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: No such validation method: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
      at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:603)
      at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:533)
      at org.apache.commons.validator.Field.validateForRule(Field.java:766)
      at org.apache.commons.validator.Field.validate(Field.java:846)
      at org.apache.commons.validator.Form.validate(Form.java:290)
      at org.apache.commons.validator.Validator.validate(Validator.java:354)
      at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:113)
      at org.apache.struts.chain.commands.servlet.ValidateActionForm.validate(ValidateActionForm.java:53)
      at org.apache.struts.chain.commands.AbstractValidateActionForm.execute(AbstractValidateActionForm.java:100)
      at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
      at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
      at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)
***************************************************


At least it tries to validate ...
0
 
jaggernatCommented:
problem with validation-rules.xml

you would have a file called validation-rules.xml in web-inf folder and in that xml file you would have the definition for "required" rule.

do you have the file?
0
 
matthew016Author Commented:
<form-validation>
  <global>
    <validator name="required"
          classname="org.apache.struts.validator.FieldChecks"
             method="validateRequired"
       methodParams="java.lang.Object,
                     org.apache.commons.validator.ValidatorAction,
                     org.apache.commons.validator.Field,
                     org.apache.struts.action.ActionErrors,
                     javax.servlet.http.HttpServletRequest"
                msg="errors.required">
    </validator>
  </global>
</form-validation>
0
 
jaggernatCommented:
u still getting that error? did you rebuild project?
0
 
matthew016Author Commented:
Yes, I still ahve the error
0
 
jaggernatCommented:
dont know why its not working for you. it works fine for me!

copy paste this code in validation-rules.xml file and rebuild the project andrestart the server

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
          "validator_1_1_3.dtd">
<!--
  $Id: validator-rules.xml 54932 2004-10-16 17:02:16Z germuska $

   This file contains the default Struts Validator pluggable validator
   definitions.  It should be placed somewhere under /WEB-INF and
   referenced in the struts-config.xml under the plug-in element
   for the ValidatorPlugIn.

      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
                                                  /WEB-INF/validation.xml"/>
      </plug-in>

   These are the default error messages associated with
   each validator defined in this file.  They should be
   added to your projects ApplicationResources.properties
   file or you can associate new ones by modifying the
   pluggable validators msg attributes in this file.

   # Struts Validator Error Messages
   errors.required={0} is required.
   errors.minlength={0} can not be less than {1} characters.
   errors.maxlength={0} can not be greater than {1} characters.
   errors.invalid={0} is invalid.

   errors.byte={0} must be a byte.
   errors.short={0} must be a short.
   errors.integer={0} must be an integer.
   errors.long={0} must be a long.
   errors.float={0} must be a float.
   errors.double={0} must be a double.

   errors.date={0} is not a date.
   errors.range={0} is not in the range {1} through {2}.
   errors.creditcard={0} is an invalid credit card number.
   errors.email={0} is an invalid e-mail address.

   Note: Starting in Struts 1.2.0 the default javascript definitions have
         been consolidated to commons-validator. The default can be overridden
         by supplying a <javascript> element with a CDATA section, just as
         in struts 1.1.

-->

<form-validation>

   <global>
   
      <validator name="required"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateRequired"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
                  msg="errors.required"/>

      <validator name="requiredif"
                 classname="org.apache.struts.validator.FieldChecks"
                 method="validateRequiredIf"
                 methodParams="java.lang.Object,
                               org.apache.commons.validator.ValidatorAction,
                               org.apache.commons.validator.Field,
                               org.apache.struts.action.ActionMessages,
                               org.apache.commons.validator.Validator,
                               javax.servlet.http.HttpServletRequest"
                 msg="errors.required"/>

      <validator name="validwhen"
          msg="errors.required"
                 classname="org.apache.struts.validator.validwhen.ValidWhen"
                 method="validateValidWhen"
                 methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       org.apache.commons.validator.Validator,
                       javax.servlet.http.HttpServletRequest"/>


      <validator name="minlength"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateMinLength"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.minlength"
           jsFunction="org.apache.commons.validator.javascript.validateMinLength"/>


      <validator name="maxlength"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateMaxLength"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.maxlength"
           jsFunction="org.apache.commons.validator.javascript.validateMaxLength"/>



      <validator name="mask"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateMask"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.invalid"/>


      <validator name="byte"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateByte"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.byte"
       jsFunctionName="ByteValidations"/>


      <validator name="short"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateShort"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.short"
       jsFunctionName="ShortValidations"/>


      <validator name="integer"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateInteger"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.integer"
       jsFunctionName="IntegerValidations"/>



      <validator name="long"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateLong"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.long"/>


      <validator name="float"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateFloat"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.float"
       jsFunctionName="FloatValidations"/>

      <validator name="double"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateDouble"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.double"/>


      <validator name="date"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateDate"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.date"
       jsFunctionName="DateValidations"/>


      <validator name="intRange"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateIntRange"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends="integer"
                  msg="errors.range"/>


      <validator name="floatRange"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateFloatRange"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends="float"
                  msg="errors.range"/>


      <validator name="creditCard"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateCreditCard"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.creditcard"/>


      <validator name="email"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateEmail"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.email"/>

      <validator name="url"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateUrl"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       javax.servlet.http.HttpServletRequest"
              depends=""
                  msg="errors.url"/>

     <!--
       This simply allows struts to include the validateUtilities into a page, it should
       not be used as a validation rule.
     -->
     <validator name="includeJavaScriptUtilities"
            classname=""
               method=""
         methodParams=""
              depends=""
                  msg=""
           jsFunction="org.apache.commons.validator.javascript.validateUtilities"/>

   </global>

</form-validation>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
0
 
matthew016Author Commented:
Dear jaggernat,

I still have the same problem,
maybe comes from validation.xml ?

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE form-validation PUBLIC
     "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
     "http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd">
         
<form-validation>
      <global>
            <constant>
                  <constant-name>login_length</constant-name>
                  <constant-value>^(\.{2,32})$</constant-value>
            </constant>
            <constant>
                  <constant-name>password_length</constant-name>
                  <constant-value>^(\.{6,})$</constant-value>
            </constant>
      </global>
      
      <formset>
            <form name="loginForm">
            
                <field property="login" depends="required">
                    <arg key="required.login"/>
                </field>
            </form>
      </formset>
      
      
</form-validation>
0
 
matthew016Author Commented:
(Don't pay attention to global variables, nbeed to remove this)
0
 
jaggernatCommented:
>>>>  <field property="login" depends="required">

can you show me your form-bean where you have the field "login". you are using dynavalidatorform right?
0
 
matthew016Author Commented:
package controllers.forms;

import org.apache.struts.validator.ValidatorForm;

public class LoginForm extends ValidatorForm{
      private static final long serialVersionUID = 1L;
      
      private String login=null;
      private String password=null;
      public String getLogin() {
            return login;
      }
      public void setLogin(String login) {
            this.login = login;
      }
      public String getPassword() {
            return password;
      }
      public void setPassword(String password) {
            this.password = password;
      }
}
0
 
jaggernatCommented:
you supposed to use dynavalidator form in struts-config.xml to define fields . dont think struts validation framework will work with validatorform.

go through this article carefully
http://www.onjava.com/pub/a/onjava/2002/12/11/jakartastruts.html?page=1
0
 
jaggernatCommented:
do one thing:
in struts config add this under <form-beans> tag

<form-beans>

<form-bean name="xyz" type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">
         <form-property name="login" type="java.lang.String" />
         <form-property name="password" type="java.lang.String" />
</form-bean>
            
</form-beans>

in <action tags> use this

<action path="/"
            name="xyz"  /xyz is the form-bean name above
            scope="request"
            validate="true"
            parameter="method"
            type="your action class" input="tiles.samepagewith errors">
            <forward name="abc" path="nextpage.display"/>
</action>

so what we are doing is instead of using  the above validatorform(your java bean) we are using dynavalidator form
named "xyz" n struts-config.xml
0
 
matthew016Author Commented:
I still have the same error :

23-nov.-2006 22:02:07 org.apache.struts.validator.DynaValidatorForm validate
GRAVE: No such validation method: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: No such validation method: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest)
      at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:603)
      at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:533)
      at org.apache.commons.validator.Field.validateForRule(Field.java:766)
      at org.apache.commons.validator.Field.validate(Field.java:846)
      at org.apache.commons.validator.Form.validate(Form.java:290)
      at org.apache.commons.validator.Validator.validate(Validator.java:354)
      at org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:117)
      at org.apache.struts.chain.commands.servlet.ValidateActionForm.validate(ValidateActionForm.java:53)
      at org.apache.struts.chain.commands.AbstractValidateActionForm.execute(AbstractValidateActionForm.java:100)
      at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
      at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
      at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)



0
 
matthew016Author Commented:
(u can notice that it uses validate of DynaValidatorForm now ...
so I rebuilt the project correctly
0
 
jaggernatCommented:
do u have commons-validator.jar in web-inf/lib directory ?
0
 
matthew016Author Commented:
commons-validator-1.3.0.jar
commons-logging-1.0.4.jar
commons-digester-1.6.jar
commons-chain-1.1.jar
commons-beanutils-1.7.0.jar
[...]
0
 
jaggernatCommented:
can yu download latest version
http://jakarta.apache.org/commons/validator/

i am running out of ideas :-0  . assuming its problem with commons validator.
0
 
matthew016Author Commented:
1.3.0 is the latest version ...
:'(
0
 
matthew016Author Commented:
In my struts-config :

[...]
<action
            path="/Login"
            type="controllers.submits.LoginAction"
            name="loginForm"
            scope="request">
</action>

[...]

<form-bean name="loginForm" type="org.apache.struts.validator.DynaValidatorForm">
         <form-property name="login" type="java.lang.String" />
         <form-property name="password" type="java.lang.String" />
</form-bean>

[...]
0
 
matthew016Author Commented:
The book I bought about Struts is a big shit,
sorry ...

Can u tell me what I should put in input ?
I don't know since  this action can come from several pages.
0
 
jaggernatCommented:
input =" the mapping for your login page , could be jsp or tile"  

0
 
matthew016Author Commented:
That's the problem, I have not a login page,
it's a menu on the left : http://www.lehall.org.

This menu is located in almost all the pages of the website.
That's why I say this action can come from more than one page (jsp)
0
 
jaggernatCommented:
what is the "mapping" of the page where you have your

loginname and password fields?


that mapping would be in struts-config.xml

0
 
matthew016Author Commented:
jaggernat,
I have nothing about this in my struts-config....
I make a new question,
u did enough in this one,
I hope u wills till support me, thanks.
0
 
jaggernatCommented:
yea, thats better. i think we are almost there.
0
All Courses

From novice to tech pro — start learning today.