struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: <global-exceptions> + <form-beans>, conflict?
Date Mon, 30 Apr 2007 04:22:03 GMT
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message