Still having problems with this: Below is the error: Please see.
Here is the validation.xml I am using. I am just trying to ensure that the password and the confirmPassword are equal. <field property="password" depends="required"> <arg key="requestaccount.password.displayname"/> </field> <field property="confirmpassword" depends="validwhen"> <arg key="requestaccount.confirmpassword.displayname"/> <var> <var-name>test</var-name> <var-value>(password == *this*)</var-value> </var> </field> My Bean has the getPassword() and getConfirmPassword() methods. Can anyone help here. thanks, Error: ##############33 java.lang.NoClassDefFoundError: antlr/TokenStream at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getMethod0(Class.java:2611) at java.lang.Class.getMethod(Class.java:1579) at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:623) at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557) at org.apache.commons.validator.Field.validateForRule(Field.java:811) at org.apache.commons.validator.Field.validate(Field.java:890) at org.apache.commons.validator.Form.validate(Form.java:174) at org.apache.commons.validator.Validator.validate(Validator.java:367) at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112) at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:807) at javax.servlet.http.HttpServlet.service(HttpServlet.java:908) at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509) at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161) at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580) java.lang.NoClassDefFoundError: antlr/TokenStream -----Original Message----- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 1:36 PM To: Struts Users Mailing List Subject: Re: validwhen problem The this keyword needs to be enclosed in astrix... <var-value>(confirmPassword == *this*)</var-value> http://struts.apache.org/userGuide/dev_validator.html#validwhen Niall ----- Original Message ----- From: "Scott Purcell" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Tuesday, March 15, 2005 7:15 PM Subject: validwhen problem Hello, I am having troubles getting the validwhen validation to work. <field property="password" depends="validwhen"> <arg0 key="requestaccount.password.displayname"/> <var> <var-name>test</var-name> <var-value>(confirmPassword == this)</var-value> </var> </field> I have a bean that extends the ValidatorForm and has setters and getters for the two fields I need. getPassword(); setPassword(String password) getConfirmPassword() setConfirmPassword(String confirmPassword); of course there is a private String called password, or confirmPassword for each method. I did study the notes, but cannot seem to get this working. Can anyone assist? Thanks, Scott --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]