Hi Ralf, try this, it should work -
<plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/conf/validator-rules.xml,/WEB-INF/conf/validator.xml"/> </plug-in> in struts1.1b2 , multiple declaration of <set-property> is not allowed. Amit. ----- Original Message ----- From: "Ralf Lorenz" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, August 22, 2002 2:50 PM Subject: Re: Losing my sanity: 1.1b & Validator problems > I inserted the javascript-tag and all I got in the html-file was : > > // End --> > </SCRIPT> > > All my validations are in this XML-file: > > <form-validation> > <!-- ========== Global Validation Definitions > ============================== --> > > <formset> > <form name="loginForm"> > <field > property="username" > depends="required"> > <arg0 key="login.password"/> > </field> > <field > property="password" > depends="required"> > <arg0 key="login.username"/> > </field> > </form> > </formset> > > </form-validation> > > That's all. I know that problems occur when I introduced Tiles-Definitions > into my webapp. > I don't know how to go on or either where to look for the error! > Can anyone help ;-? > Ralf > > out of my struts-config.xml: > > <form-beans> > <form-bean > name = "loginForm" > dynamic = "true" > type = "org.apache.struts.validator.DynaValidatorForm"> > <form-property name = "username" type = "java.lang.String" /> > <form-property name = "password" type = "java.lang.String" /> > </form-bean> > </form-beans> > > <action-mappings> > <action > path="/login" > type="de.subsist.zeiterfassung.controller.actions.LoginAction" > scope="request" > name="loginForm" > validate="true" > input="/security/login.jsp"> > <forward name="Success" path="/secureZone/inside.jsp" redirect="true"/> > <forward name="Failure" path="/security/login.jsp" redirect="false"/> > </action> > </action-mappings> > > <plug-in > className="org.apache.struts.validator.ValidatorPlugIn"> > <set-property property="pathname" > value="/WEB-INF/conf/validator-rules.xml"/> > <set-property property="pathname" value="/WEB-INF/conf/validator.xml"/> > </plug-in> > > <plug-in > className="org.apache.struts.tiles.TilesPlugin"> > <set-property property="definitions-config" > value="/WEB-INF/conf/tiles-defs.xml" /> > <set-property property="definitions-debug" value="2" /> > <set-property property="definitions-parser-details" value="2" /> > <set-property property="definitions-parser-validate" value="true" /> > </plug-in> > > > > ----- Original Message ----- > From: "Richards, Devin N (Devin)" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Wednesday, August 21, 2002 6:17 PM > Subject: RE: Losing my sanity: 1.1b & Validator problems > > > > You have all of your validations in the XML? > > Have you tried adding the <html:javascript formName="yourForm"> to the JSP > page to see if the validation is working correctly? Once you have this you > can "view source" and see the validation code it generated. This will show > you if the validator plug-in is setup correctly and that your XML is > correct. > > > > BTW: we are most likely going to production on 1.1-b2 > > > > Good luck. > > > > -Devin > > > > -----Original Message----- > > From: Andrew Shirk [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 21, 2002 12:13 PM > > To: Struts Users Mailing List > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Subject: Re: Losing my sanity: 1.1b & Validator problems > > > > > > Devin, thanks for further the further explanation. I replied to your > > previous email earlier this morning, but it seems to have been lost in > > the ether. Anyway, I also tried including super.validate() in my form > > bean, which confirmed that Validation is in fact being done. The mystery > > is why validation is being performed but control is never returned to > > the JSP. It simply dies. No error. Nothing. I didn't change anything in > > the code when moving to 1.1b, so am beginning to wonder if this is a bug > > of some sort. > > > > I've spent way too many hours trying to track down the problem and may > > have to just go back to 1.1a if I can't find a solution today. > > > > Thanks again for the help. > > > > Andrew > > > > On Wednesday, August 21, 2002, at 10:16 AM, Richards, Devin N (Devin) > > wrote: > > > > > I had some validation that was done in the validation.xml > > > (required/minlenght etc) and then I wanted to do some business rule > > > validation that I could not do in the XML. When I put the code into my > > > form bean's validate() method, I got all of the business validations, > > > but none of my basic required/minlenght validations that were done in > > > the XML. Once I added a call to super.validate() it picked them up. > > > > > > Here is part of the struts-config.xml: > > > <action > > > path="/rmaFormSubmit" > > > name="rmaForm" > > > type="com.lucent.portal.rma.RmaFormAction" > > > input="rmaFormDef" > > > scope="request" > > > parameter="submit" > > > validate="true"> > > > <forward name="continue" path="rmaAckDef" /> > > > </action> > > > > > > <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> > > > <set-property property="pathnames" > > > value="/WEB-INF/validator-rules.xml, > > > /WEB-INF/validation.xml, > > > /WEB-INF/classes/com/lucent/portal/rma/RmaValidation.xml" /> > > > </plug-in> > > > > > > The "rmaAckDef" as well as "rmaFormDef" are Tiles definations. > > > > > > Here is part of RmaValidation.xml: > > > <formset> > > > <form name="rmaForm"> > > > <field property="companyName" depends="required"> > > > <arg0 key="label.companyName" /> > > > </field> > > > > > > <field property="firstName" depends="required"> > > > <arg0 key="label.firstName" /> > > > </field> > > > </formset> > > > > > > For these validations I use the <html:javascript> tag in the form JSP > > > to catch all normal validations before submit. > > > > > > Here is part of the RmaForm.java (extends ValidatorForm): > > > public ActionErrors validate(ActionMapping mapping, > > > HttpServletRequest request) > > > { > > > // > > > // Do validations from XML > > > > > > ActionErrors errors = super.validate(mapping, request); > > > > > > > > > // > > > // Extended validation checking > > > > > > if(this.isDoa()) > > > if(!checkDosOrderNumber()) > > > errors.add("dosOrderNumber", new > > > ActionError("rma.errors.form.dosOrderNumber")); > > > > > > return errors; > > > } > > > > > > In order to get the validatios from RmaValidation.xml I had to put the > > > call to super.validate(). > > > > > > HTH > > > > > > -Devin > > > > > > -----Original Message----- > > > From: Ralf Lorenz [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, August 21, 2002 10:21 AM > > > To: Struts Users Mailing List > > > Subject: Re: Losing my sanity: 1.1b & Validator problems > > > > > > > > > Devin, > > > can you please explain that a little further? The problem that Andrew > > > describes sounds familiar to me. > > > I started using struts1.1b with validator and everything worked fine, > > > just > > > using a DynaValidatorForm. > > > But then when I introduced Tiles to my application the validation didn't > > > take place. Although the > > > ValidatorPlugIn was loaded and there was no Exception ( looking into the > > > logs). It's just that > > > it don't happen. > > > I don't know what you mean by putting a super.validate() as the first > > > line > > > ... because I just use > > > given validation-rules (required, minlength ...) and some > > > DynaValidatorForms. > > > Any help on that ;-? > > > Ralf > > > > > > ----- Original Message ----- > > > From: "Richards, Devin N (Devin)" <[EMAIL PROTECTED]> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > > Sent: Wednesday, August 21, 2002 3:19 PM > > > Subject: RE: Losing my sanity: 1.1b & Validator problems > > > > > > > > >> I noticed that when I went to 1.1b2 I had to insert a call to > > > super.validate() as the first line in my validate() code to pick up all > > > of > > > the validations I set in my validation.xml file. > > >> > > >> -Devin > > >> > > >> > > >> > > >> -----Original Message----- > > >> From: Andrew Shirk [mailto:[EMAIL PROTECTED]] > > >> Sent: Tuesday, August 20, 2002 8:09 PM > > >> To: Struts Users Mailing List > > >> Subject: Losing my sanity: 1.1b & Validator problems > > >> > > >> > > >> I upgraded to Struts 1.1b last week (and to Tomcat 4.1.9 - which is > > >> great great stuff) and everything seemed to go fine. However, today, I > > >> was demonstrating my app to a friend when I noticed Validator > > >> validations were not being performed. I checked the logs and the > > >> validation configuration files are being loaded just fine, but still no > > >> validation errors were being caught. I also noticed in the archives > > >> mention of a change in the way the plugin is configured in struts- > > >> config.xml. I made the change in my struts-config.xml thinking that > > >> must > > >> have been the problem, but alas, things got worse! Now, when the > > >> ValidatorForm is posted to the server, nothing happens at all! After > > >> about 10 seconds of processing, the browser seems to receive an empty > > >> response. A blank document is all that's received. I checked the logs, > > >> and no exceptions are being thrown. I have checked everything I can > > >> think of 4 or 5 times, and don't know what else to do. This worked > > >> perfectly in 1.1a. > > >> > > >> Please help if you have any ideas. > > >> > > >> Thanks very much, > > >> > > >> Andrew > > >> > > >> registrationForm extends ValidatorForm > > >> > > >> <action path="/registration/save" > > >> type="com.myapp.action.RegistrationAction" > > >> name="registrationForm" > > >> validate="true" > > >> parameter="save" > > >> scope="request" > > >> input="/registration.jsp"> > > >> <forward name="failure" path="/registration.jsp"/> > > >> <forward name="success" > > >> path="/do/registration/confirm"/> > > >> </action> > > >> > > >> > > >> -- > > >> To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > >> For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > >> > > >> -- > > >> To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > >> For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > >> > > > > > > > > > -- > > > To unsubscribe, e-mail: <mailto:struts-user- > > > [EMAIL PROTECTED]> > > > For additional commands, e-mail: <mailto:struts-user- > > > [EMAIL PROTECTED]> > > > > > > -- > > > To unsubscribe, e-mail: <mailto:struts-user- > > > [EMAIL PROTECTED]> > > > For additional commands, e-mail: <mailto:struts-user- > > > [EMAIL PROTECTED]> > > > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>