Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
Jeanne Boyarsky
Paul Clapham
Sheriffs:
Liutauras Vilda
Henry Wong
Devaka Cooray
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Al Hobbs
Carey Brown
Bartenders:
Piet Souris
Mikalai Zaikin
Himai Minh
Forum:
Struts
error with <struts-config.xml>
Swetha Bhagavathula
Ranch Hand
Posts: 112
I like...
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello i wrote small
struts
application connecting to oracle database using connecting pooling with
tomcat
7,when i run my application I am facing the following error:
SEVERE: Parse Error at line 80 column 17: The content of element type "struts-config" must match "(display-name?,description?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)". org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(display-name?,description?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
And below is my struts configuration file. Please help me where my mistake is..
<struts-config> <display-name/> <form-beans> <form-bean name="CustomerForm" type="net.viralpatel.struts.validation.form.CustomerForm" /> </form-beans> <action-mappings> <action path="/customer" name="CustomerForm" validate="true" input="/index.jsp" type="CustomerAction"> <forward name="success" path="/Customer.jsp" /> <forward name="failure" path="/index.jsp" /> </action> </action-mappings> <message-resources parameter="com/myapp/struts/ApplicationResource"/> <!-- ========================= Tiles plugin ===============================--> <!-- This plugin initialize Tiles definition factory. This later can takes some parameters explained here after. The plugin first read parameters from web.xml, thenoverload them with parameters defined here. All parameters are optional. The plugin should be declared in each struts-config file. - definitions-config: (optional) Specify configuration file names. There can be several comma separated file names (default: ?? ) - moduleAware: (optional - struts1.1) Specify if the Tiles definition factory is module aware. If true (default), there will be one factory for each Struts module. If false, there will be one common factory for all module. In this later case, it is still needed to declare one plugin per module. The factory will be initialized with parameters found in the first initialized plugin (generally the one associated with the default module). true : One factory per module. (default) false : one single shared factory for all modules - definitions-parser-validate: (optional) Specify if xml parser should validate the Tiles configuration file. true : validate. DTD should be specified in file header (default) false : no validation Paths found in Tiles definitions are relative to the main context. --> <plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> <set-property property="moduleAware" value="true" /> </plug-in> <!-- ========================= Validator plugin ================================= --> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> </plug-in> </struts-config>
SCJP5
Shailesh Narkhede
Ranch Hand
Posts: 368
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Try by adding following line at starts of struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
Thanks,
Shailesh
Swetha Bhagavathula
Ranch Hand
Posts: 112
I like...
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks shailesh prob with struts config got rectified
SCJP5
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
<global-forwards> problem in struts-config.xml
Cannot find ActionMappings or ActionFormBeans collection
Getting Http 404 Error while running Strut Application
javax.servlet.jsp.JspException: Exception creating bean of class com.LoginForm ????
struts-config parsing error-help
More...