- This topic has 3 replies, 2 voices, and was last updated 18 years, 11 months ago by creen.
-
AuthorPosts
-
creenMemberHi,
I recently started working on an excisting project that uses struts. A while ago I started to encounter problems all of a sudden… It seemed that there were problems loading the Validation rules:
INFO [org.apache.struts.validator.ValidatorPlugIn] Loading validation rules file from ‘/WEB-INF/validator-rules.xml’
INFO [org.apache.struts.validator.ValidatorPlugIn] Loading validation rules file from ‘/WEB-INF/validation.xml’After a while I got a “connection: timeout” error, and it seemed that jakarta.apache.org was down… After some investigation in this (for me) new code I found these Doctypes:
<!DOCTYPE form-validation PUBLIC “-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN” “http://jakarta.apache.org/commons/dtds/validator_1_1.dtd”>
(I took this from the validation.xml file)
Now I was wondering if it always looks locally for the (in this case) validator_1_1.dtd file first, and, if it does, where does it look for it?
(As you can understand, I want to have these files locally… I don’t want to get in trouble when someone elses server crashes 🙂 )I also tried to change the URL in the DOCTYPE is several xml-files, but after rebuilding the project, the doctype is changed back to the former value….
I’m fairly new in the world of struts and validation 🙂 So ANY help is very much appreciated…
Thanx in advance!
Riyad KallaMemberWhat is happening is when the XML parser is parsing the validation file, it’s pulling down the DTD to validate it (from the URL in the file). If you want it to look in the current dir, go download that file, and place it in the same dir as the XML file, and change the path from the URL you see above, to just the name of the DTD.
creenMemberOk thanks, that clarifies what’s actually going on, and what I would have to change… 🙂
But if I am not mistaken “validation.xml” is a file that is generated when the project is compiled… So when I change the URL in that file and compile the project after that, the old URL value re-appears… :
http://jakarta.apache.org/commons/dtds/validator_1_1.dtd
The strange thing is that this URL only appears in “validation.xml” and nowhere else in the entire project… Could it be a setting in MyEclipse somewhere?
Thanks in advance!
creenMemberAny suggestions?
-
AuthorPosts