jiangshachina wrote:
Hi guys,
I'm new to Struts.
I'm using Struts 1.3.8 + JBoss 4.0.5.GA + JDK 1.5.0 + Windows XP.
I have a struts-config file as show as below,
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<global-exceptions>
<exception key="login.failure" type="exception.LoginException"
path="/failure.jsp">
</exception>
</global-exceptions>
<form-beans>
<form-bean name="userForm" type="form.UserForm" />
</form-beans>
</struts-config>
When I started the JBoss, an org.xml.sax.SAXParseException was thrown, the
exception said:
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*)".
If I deleted element global-exceptions or form-beans from the struts-config
file, that would works well.
It seems that the two elements conflict with each other!?
I'm puzzled by the matter?
They don't conflict, but order matters. The global-exceptions element
needs to come after the form-beans element.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]