I get this error in my log file when i restart my tomcat ./dhar is my context - Parse Error at line 27 column 67: Element type "plug-in" must be declared. org.xml.sax.SAXParseException: Element type "plug-in" must be declared. ......................... - Parse Error at line 32 column 17: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-forwards?,action-mappings?)". org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(data-sources?,form-beans?,global-forwards?,action-mappings?)". .................... - Loading validation rules file from '/WEB-INF/validator-rules.xml' - Skipping validation rules file from '/WEB-INF/validator-rules.xml'. No stream could be opened. javax.servlet.ServletException: Skipping validation rules file from '/WEB-INF/validator-rules.xml'. No stream could be opened. ........................... - Marking servlet action as unavailable - Servlet /dhar threw load() exception javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml' .................... AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@1a28362) LogAbandoned: false RemoveAbandoned: true RemoveAbandonedTimeout: 300 - Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd - org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
This is telling you that Struts can't find /WEB-INF/validator-rules.xml or /WEB-INF/validation.xml. My guess is you didn't include these files in your WAR file. If you're going to configure the Struts validator, you must have correctly configured xml files to go with it. If aren't using the Struts validator, take out the <plug-in> tag for the validator. [ July 31, 2006: Message edited by: Merrill Higginson ]
Didn't you say in your first post that it works fine if you remove the <plug-in> tag? Now that you've removed that tag, is it still not working?
In answer to your question, I do see one possible problem with your struts-config.xml file. In your submitForm form bean definition, you list "SubmitForm" as the type. This should be a fully qualified class name including the package. If SubmitForm is in the default package, that's a mistake also. In web applications, classes should always be in a package other than the default package. [ August 01, 2006: Message edited by: Merrill Higginson ]
When i remove plugin it works fine . Can anyone please tell me what i have to do from scratch to use struts validator.I downloaded struts 1.2 what files i need to copy to web-inf folder what is the settings in web.xml ,struts-config.xml .Can anyone please suggest any useful link Thanks
This guy is skipping without a rope. At least, that's what this tiny ad said:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop