RE: RE: Validator won't kick-in
Have you gotten anywhere with this? I'm seeing the exact problem, and I'm not using a DynaValidatorForm. No errors are displayed, no exceptions thrown. It's as though the validator just isn't getting invoked. On Wed, 2003-02-05 at 07:57, otisg wrote: Yes, I have that, too: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validator-rules-amp.xml, /WEB-INF/validation-amp.xml/ /plug-in And these files really are included in the WAR: 3380 Tue Feb 04 19:33:00 EST 2003 WEB-INF/struts-config-amp.xml 39699 Tue Feb 04 16:19:22 EST 2003 WEB-INF/validator-rules.xml 3048 Tue Feb 04 18:58:30 EST 2003 WEB-INF/validation-amp.xml 1261 Tue Feb 04 16:19:22 EST 2003 WEB-INF/validator-rules-amp.xml Could it be the indentation? (I know, would be crazy, but...) Thanks, Otis On Wed, 5 Feb 2003, Pani, Gourav ([EMAIL PROTECTED]) wrote: I had this strange issue where the plugin had to be initialized at the bottom of the struts-config.xml to get it to work. plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 10:04 AM To: Stuart Jameson; Struts Users Mailing List Subject: RE: RE: Validator won't kick-in Hello, No, I don't have that. I jut added it and tried it, but it didn't change anything - Validator still didn't kick in. I have not seen this mentioned in any docs. Any help would be appreciated. Thank you, Otis On Wed, 5 Feb 2003, Stuart Jameson ([EMAIL PROTECTED]) wrote: In web xml there is the following is it set for you? init-param param-namevalidate/param-name param-valuetrue/param-value /init-param -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 23:00 To: Tennent, Erik Subject: Re: RE: Validator won't kick-in Yes I did :) My original email actually shows that my 'loginForm' is of type org.apache.struts.validator.DynaValidatorForm I am also using input=... in the action mapping. Here is the action mapping in question: action path= /Login type= com.example.action.LoginAction scope= request validate= true name= loginForm input= /WEB-INF/shell/login.jsp forward name= success path=/WEB-INF/shell/home.jsp/ forward name= failure path=/WEB-INF/shell/login.jsp/ /action Thanks, Otis On Tue, 4 Feb 2003, Tennent, Erik ([EMAIL PROTECTED]) wrote: Did you remember to extend ValidatorForm or ValidatorActionForm? On a side note, with the ValidatorForm, you also have to define an input=/SomeAction.do inside of your action.. tag so struts knows where to forward to if there is an error. The input can also refer to a jsp page or a tiles def. action path=/HotelSave type=hotel.HotelSaveAction name=HotelForm validate=true scope=request input=hotelEdit forward name=hotelDisplay path=hotelDisplay redirect=false / /action -ET -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Validator won't kick-in Hello, I am trying to use Commons Validator with Struts, but I can't get it to 'kick in'. I am using the CVS HEAD version of Struts and Taglibs, and Validator I just built from CVS the other day. My Struts config has a 'loginForm' defined as: form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean The 2 Validator's files are defined properly in Struts config via plugin. IN Struts config I have /Login action tied to the loginForm form. I also have validate=true set in the action mapping (is this needed?). In my JSP that contains this loginForm I have action=/Login in the HTML form. Fields are 'username' and 'password'. My validation.xml contains
RE: RE: Validator won't kick-in
In web xml there is the following is it set for you? init-param param-namevalidate/param-name param-valuetrue/param-value /init-param -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 23:00 To: Tennent, Erik Subject: Re: RE: Validator won't kick-in Yes I did :) My original email actually shows that my 'loginForm' is of type org.apache.struts.validator.DynaValidatorForm I am also using input=... in the action mapping. Here is the action mapping in question: action path= /Login type= com.example.action.LoginAction scope= request validate= true name= loginForm input= /WEB-INF/shell/login.jsp forward name= success path=/WEB-INF/shell/home.jsp/ forward name= failure path=/WEB-INF/shell/login.jsp/ /action Thanks, Otis On Tue, 4 Feb 2003, Tennent, Erik ([EMAIL PROTECTED]) wrote: Did you remember to extend ValidatorForm or ValidatorActionForm? On a side note, with the ValidatorForm, you also have to define an input=/SomeAction.do inside of your action.. tag so struts knows where to forward to if there is an error. The input can also refer to a jsp page or a tiles def. action path=/HotelSave type=hotel.HotelSaveAction name=HotelForm validate=true scope=request input=hotelEdit forward name=hotelDisplay path=hotelDisplay redirect=false / /action -ET -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Validator won't kick-in Hello, I am trying to use Commons Validator with Struts, but I can't get it to 'kick in'. I am using the CVS HEAD version of Struts and Taglibs, and Validator I just built from CVS the other day. My Struts config has a 'loginForm' defined as: form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean The 2 Validator's files are defined properly in Struts config via plugin. IN Struts config I have /Login action tied to the loginForm form. I also have validate=true set in the action mapping (is this needed?). In my JSP that contains this loginForm I have action=/Login in the HTML form. Fields are 'username' and 'password'. My validation.xml contains: form name=loginForm field property=username depends=required msg name=required key=Required Called resource=false/ /field field property=password depends=required /field /form My Action class does not contain any code that calls form.validate(mapping, request). I don't think this is needed - I think everything should work as defined declaratively in these filesautomagically :) ... ...but it does not do that (for me) :( I've read Chapter 11 of Cavaness' book a few times and according to him what I described above should suffice. When I go to my login page with the login form and leave the username completely blank I expect to get an error...but I don't get it. One more thing that may be worth mentioning, my Action class has: return mapping.findForward(success); And the JSP defined for this success contains: html:errors/ I expect this to show me Validator's errors. I get no application errors, all looks good, too good - I want to see that error about a missing required username field :) Thanks, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - 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] Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - 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
RE: RE: Validator won't kick-in
Hello, No, I don't have that. I jut added it and tried it, but it didn't change anything - Validator still didn't kick in. I have not seen this mentioned in any docs. Any help would be appreciated. Thank you, Otis On Wed, 5 Feb 2003, Stuart Jameson ([EMAIL PROTECTED]) wrote: In web xml there is the following is it set for you? init-param param-namevalidate/param-name param-valuetrue/param-value /init-param -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 23:00 To: Tennent, Erik Subject: Re: RE: Validator won't kick-in Yes I did :) My original email actually shows that my 'loginForm' is of type org.apache.struts.validator.DynaValidatorForm I am also using input=... in the action mapping. Here is the action mapping in question: action path= /Login type= com.example.action.LoginAction scope= request validate= true name= loginForm input= /WEB-INF/shell/login.jsp forward name= success path=/WEB-INF/shell/home.jsp/ forward name= failure path=/WEB-INF/shell/login.jsp/ /action Thanks, Otis On Tue, 4 Feb 2003, Tennent, Erik ([EMAIL PROTECTED]) wrote: Did you remember to extend ValidatorForm or ValidatorActionForm? On a side note, with the ValidatorForm, you also have to define an input=/SomeAction.do inside of your action.. tag so struts knows where to forward to if there is an error. The input can also refer to a jsp page or a tiles def. action path=/HotelSave type=hotel.HotelSaveAction name=HotelForm validate=true scope=request input=hotelEdit forward name=hotelDisplay path=hotelDisplay redirect=false / /action -ET -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Validator won't kick-in Hello, I am trying to use Commons Validator with Struts, but I can't get it to 'kick in'. I am using the CVS HEAD version of Struts and Taglibs, and Validator I just built from CVS the other day. My Struts config has a 'loginForm' defined as: form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean The 2 Validator's files are defined properly in Struts config via plugin. IN Struts config I have /Login action tied to the loginForm form. I also have validate=true set in the action mapping (is this needed?). In my JSP that contains this loginForm I have action=/Login in the HTML form. Fields are 'username' and 'password'. My validation.xml contains: form name=loginForm field property=username depends=required msg name=required key=Required Called resource=false/ /field field property=password depends=required /field /form My Action class does not contain any code that calls form.validate(mapping, request). I don't think this is needed - I think everything should work as defined declaratively in these filesautomagically :) ... ...but it does not do that (for me) :( I've read Chapter 11 of Cavaness' book a few times and according to him what I described above should suffice. When I go to my login page with the login form and leave the username completely blank I expect to get an error...but I don't get it. One more thing that may be worth mentioning, my Action class has: return mapping.findForward(success); And the JSP defined for this success contains: html:errors/ I expect this to show me Validator's errors. I get no application errors, all looks good, too good - I want to see that error about a missing required username field :) Thanks, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - 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
RE: RE: Validator won't kick-in
I had this strange issue where the plugin had to be initialized at the bottom of the struts-config.xml to get it to work. plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 10:04 AM To: Stuart Jameson; Struts Users Mailing List Subject: RE: RE: Validator won't kick-in Hello, No, I don't have that. I jut added it and tried it, but it didn't change anything - Validator still didn't kick in. I have not seen this mentioned in any docs. Any help would be appreciated. Thank you, Otis On Wed, 5 Feb 2003, Stuart Jameson ([EMAIL PROTECTED]) wrote: In web xml there is the following is it set for you? init-param param-namevalidate/param-name param-valuetrue/param-value /init-param -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 23:00 To: Tennent, Erik Subject: Re: RE: Validator won't kick-in Yes I did :) My original email actually shows that my 'loginForm' is of type org.apache.struts.validator.DynaValidatorForm I am also using input=... in the action mapping. Here is the action mapping in question: action path= /Login type= com.example.action.LoginAction scope= request validate= true name= loginForm input= /WEB-INF/shell/login.jsp forward name= success path=/WEB-INF/shell/home.jsp/ forward name= failure path=/WEB-INF/shell/login.jsp/ /action Thanks, Otis On Tue, 4 Feb 2003, Tennent, Erik ([EMAIL PROTECTED]) wrote: Did you remember to extend ValidatorForm or ValidatorActionForm? On a side note, with the ValidatorForm, you also have to define an input=/SomeAction.do inside of your action.. tag so struts knows where to forward to if there is an error. The input can also refer to a jsp page or a tiles def. action path=/HotelSave type=hotel.HotelSaveAction name=HotelForm validate=true scope=request input=hotelEdit forward name=hotelDisplay path=hotelDisplay redirect=false / /action -ET -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Validator won't kick-in Hello, I am trying to use Commons Validator with Struts, but I can't get it to 'kick in'. I am using the CVS HEAD version of Struts and Taglibs, and Validator I just built from CVS the other day. My Struts config has a 'loginForm' defined as: form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean The 2 Validator's files are defined properly in Struts config via plugin. IN Struts config I have /Login action tied to the loginForm form. I also have validate=true set in the action mapping (is this needed?). In my JSP that contains this loginForm I have action=/Login in the HTML form. Fields are 'username' and 'password'. My validation.xml contains: form name=loginForm field property=username depends=required msg name=required key=Required Called resource=false/ /field field property=password depends=required /field /form My Action class does not contain any code that calls form.validate(mapping, request). I don't think this is needed - I think everything should work as defined declaratively in these filesautomagically :) ... ...but it does not do that (for me) :( I've read Chapter 11 of Cavaness' book a few times and according to him what I described above should suffice. When I go to my login page with the login form and leave the username completely blank I expect to get an error...but I don't get it. One more thing that may be worth mentioning, my Action class has: return mapping.findForward(success); And the JSP defined for this success contains: html:errors/ I expect this to show me Validator's errors. I get no application errors, all looks good, too good - I want to see that error about a missing required username field :) Thanks, Otis
RE: RE: Validator won't kick-in
Yes, I have that, too: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validator-rules-amp.xml, /WEB-INF/validation-amp.xml/ /plug-in And these files really are included in the WAR: 3380 Tue Feb 04 19:33:00 EST 2003 WEB-INF/struts-config-amp.xml 39699 Tue Feb 04 16:19:22 EST 2003 WEB-INF/validator-rules.xml 3048 Tue Feb 04 18:58:30 EST 2003 WEB-INF/validation-amp.xml 1261 Tue Feb 04 16:19:22 EST 2003 WEB-INF/validator-rules-amp.xml Could it be the indentation? (I know, would be crazy, but...) Thanks, Otis On Wed, 5 Feb 2003, Pani, Gourav ([EMAIL PROTECTED]) wrote: I had this strange issue where the plugin had to be initialized at the bottom of the struts-config.xml to get it to work. plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 10:04 AM To: Stuart Jameson; Struts Users Mailing List Subject: RE: RE: Validator won't kick-in Hello, No, I don't have that. I jut added it and tried it, but it didn't change anything - Validator still didn't kick in. I have not seen this mentioned in any docs. Any help would be appreciated. Thank you, Otis On Wed, 5 Feb 2003, Stuart Jameson ([EMAIL PROTECTED]) wrote: In web xml there is the following is it set for you? init-param param-namevalidate/param-name param-valuetrue/param-value /init-param -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 23:00 To: Tennent, Erik Subject: Re: RE: Validator won't kick-in Yes I did :) My original email actually shows that my 'loginForm' is of type org.apache.struts.validator.DynaValidatorForm I am also using input=... in the action mapping. Here is the action mapping in question: action path= /Login type= com.example.action.LoginAction scope= request validate= true name= loginForm input= /WEB-INF/shell/login.jsp forward name= success path=/WEB-INF/shell/home.jsp/ forward name= failure path=/WEB-INF/shell/login.jsp/ /action Thanks, Otis On Tue, 4 Feb 2003, Tennent, Erik ([EMAIL PROTECTED]) wrote: Did you remember to extend ValidatorForm or ValidatorActionForm? On a side note, with the ValidatorForm, you also have to define an input=/SomeAction.do inside of your action.. tag so struts knows where to forward to if there is an error. The input can also refer to a jsp page or a tiles def. action path=/HotelSave type=hotel.HotelSaveAction name=HotelForm validate=true scope=request input=hotelEdit forward name=hotelDisplay path=hotelDisplay redirect=false / /action -ET -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Validator won't kick-in Hello, I am trying to use Commons Validator with Struts, but I can't get it to 'kick in'. I am using the CVS HEAD version of Struts and Taglibs, and Validator I just built from CVS the other day. My Struts config has a 'loginForm' defined as: form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean The 2 Validator's files are defined properly in Struts config via plugin. IN Struts config I have /Login action tied to the loginForm form. I also have validate=true set in the action mapping (is this needed?). In my JSP that contains this loginForm I have action=/Login in the HTML form. Fields are 'username' and 'password'. My validation.xml contains: form name=loginForm field property=username depends=required msg name=required key=Required Called resource=false/ /field field property=password depends=required /field /form My Action class does not contain any code that calls form.validate(mapping, request). I don't think this is needed - I
Re: RE: Validator won't kick-in
Yes I did :) My original email actually shows that my 'loginForm' is of type org.apache.struts.validator.DynaValidatorForm I am also using input=... in the action mapping. Here is the action mapping in question: action path= /Login type= com.example.action.LoginAction scope= request validate= true name= loginForm input= /WEB-INF/shell/login.jsp forward name= success path=/WEB-INF/shell/home.jsp/ forward name= failure path=/WEB-INF/shell/login.jsp/ /action Thanks, Otis On Tue, 4 Feb 2003, Tennent, Erik ([EMAIL PROTECTED]) wrote: Did you remember to extend ValidatorForm or ValidatorActionForm? On a side note, with the ValidatorForm, you also have to define an input=/SomeAction.do inside of your action.. tag so struts knows where to forward to if there is an error. The input can also refer to a jsp page or a tiles def. action path=/HotelSave type=hotel.HotelSaveAction name=HotelForm validate=true scope=request input=hotelEdit forward name=hotelDisplay path=hotelDisplay redirect=false / /action -ET -Original Message- From: otisg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: Validator won't kick-in Hello, I am trying to use Commons Validator with Struts, but I can't get it to 'kick in'. I am using the CVS HEAD version of Struts and Taglibs, and Validator I just built from CVS the other day. My Struts config has a 'loginForm' defined as: form-bean name=loginForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String/ form-property name=password type=java.lang.String/ /form-bean The 2 Validator's files are defined properly in Struts config via plugin. IN Struts config I have /Login action tied to the loginForm form. I also have validate=true set in the action mapping (is this needed?). In my JSP that contains this loginForm I have action=/Login in the HTML form. Fields are 'username' and 'password'. My validation.xml contains: form name=loginForm field property=username depends=required msg name=required key=Required Called resource=false/ /field field property=password depends=required /field /form My Action class does not contain any code that calls form.validate(mapping, request). I don't think this is needed - I think everything should work as defined declaratively in these filesautomagically :) ... ...but it does not do that (for me) :( I've read Chapter 11 of Cavaness' book a few times and according to him what I described above should suffice. When I go to my login page with the login form and leave the username completely blank I expect to get an error...but I don't get it. One more thing that may be worth mentioning, my Action class has: return mapping.findForward(success); And the JSP defined for this success contains: html:errors/ I expect this to show me Validator's errors. I get no application errors, all looks good, too good - I want to see that error about a missing required username field :) Thanks, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - 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] Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]