I wrote a small struts application with a login page and registration page. If I login I get a success page. If i register, i will check the password and confirm password fileds if they match i get a success page else failure page.
I did not use any database. I wrote the required Form Beans, Action Classes of those.
In struts-config.xml
it is showing an error at the <struts-config>
tag:
"The content of element type “struts-config” must match “(datasource?,form-beans?,global-forwards?,action-mapping?)"
How to resolve this problem? I am using Eclipse as my IDE.
Your struts-config.xml file is invalid.
Struts-config.xml is an XML file and as such can be validated against a DTD or an XML-Schema.
The error you are seeing in Eclipse is a result of the struts-config.xml file being validated against its DTD and the validation fails. Most likely it is expecting your tags to be in a specific order and you didn't write them that way, you added tags that are not specified in the DTD, you misspelled some tag etc.
Look at the struts-config DTD and then at your struts-config.xml file to see where they differ.
P.S. there are more versions of the DTD so make sure you are looking at the right one.
http://struts.apache.org/dtds/struts-config_1_0.dtd
http://struts.apache.org/dtds/struts-config_1_1.dtd
http://struts.apache.org/dtds/struts-config_1_2.dtd
http://struts.apache.org/dtds/struts-config_1_3.dtd
http://struts.apache.org/dtds/struts-config_1_4.dtd