Hi, I doubt the way you use the validator is correct. You can use a "validator" attribute inside the <h:inputText> tag or use <f:validator> as a nested tag.
i.e., <h:inputText type="text" id="login" value="#{UserBean.loginname}" size="15" validator="#{UserBean.validateLogin}" required="true" /> or, <h:inputText type="text" id="login" value="#{UserBean.loginname}" size="15" required="true"> <f:validator validatorId="validatorId.as.defined.in.face_config"/> you'll need to create a validator class and register the validator in the face-config, if going with the second way. HTH, Saul ----- Original Message ----- From: Elisa Budelli To: users@myfaces.apache.org Sent: Friday, March 16, 2007 8:28 AM Subject: Tomcat6 Validation Hello, I am using MyFaces version 1.1.5 and Tomcat 6. Everything seems to work fine except for Validation. In a Backing bean i have the following method: public void validateLogin(FacesContext context, UIComponent toValidate, Object value) throws ValidatorException{ .............. } int the newUser.xhtml page: <h:inputText type="text" id="login" value="#{UserBean.loginname}" size="15" required="true"> <validation value="#{ UserBean.validateLogin}"/> But when invoking the method that triggers validation i receive always the following exception: javax.servlet.ServletException : /pages/newUser.xhtml @17,137 validator="#{UserBean.validateLogin}": Method not found: [EMAIL PROTECTED](javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object ) javax.faces.webapp.FacesServlet.service(FacesServlet.java:154) javax.faces.el.MethodNotFoundException: /pages/newUser.xhtml @17,137 validator="#{UserBean.validateLogin}": Method not found: [EMAIL PROTECTED](javax.faces.context.FacesContext, javax.faces.component.UIComponent , java.lang.Object) com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:71) javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:181) javax.faces.component.UIInput.validateValue(UIInput.java:313) javax.faces.component.UIInput.validate(UIInput.java:354) javax.faces.component.UIInput.processValidators (UIInput.java:184) javax.faces.component.UIForm.processValidators(UIForm.java:73) javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:627) javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java :149) de.mindmatters.faces.lifecycle.ProcessValidationsPhase.executePhase(ProcessValidationsPhase.java:43) de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37) de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase (LifecycleImpl.java:166) de.mindmatters.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:211) javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)Any kind of help will be very welcomed. Thanks -------------------------------- Spam/Virus scanning by CanIt Pro For more information see http://www.kgbinternet.com/SpamFilter.htm To control your spam filter, log in at http://filter.kgbinternet.com