You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashutosh Satyam <as...@alopa.com> on 2004/07/14 06:53:40 UTC
strut-config.xml parse error issue - Urgent!!
Hi,
I have a struts based web application.
Recently I updated my struts config file
to handle exceptions declaratively.
Below is the snippet of the struts config file.
<global-exceptions>
<exception
key="error.runtime"
path="Error"
scope="request"
type="java.lang.Exception"
handler="com.exception.MyExceptionHandler"/>
</global-exceptions>
<action
path="/CCMCmtsConfig"
type="com.test.ui.action.CCMCmtsConfAction"
name="ccmCmtsConfForm"
scope="session"
parameter="method">
<forward name="cmtsadd" path="CmtsAdd"/>
<forward name="cmtsmod" path="CmtsMod"/>
<forward name="cmtssearch" path="CmtsSrch"/>
<forward name="success" path="CmtsList"/>
<forward name="error" path="CmtsError"/>
<exception
key="error.session.expired"
type="com.exception.InvalidSessionException"
path="CmtsError"/>
<exception
key="error.invalid.parameter"
type="com.exception.InvalidParameterException"
path="CmtsError"/>
</action>
After doing this modification, I'm getting this exception
during start up. I'm building the application using Struts1.1
2004-07-14 09:34:17,654 [Thread-3 ] digester.Digester : ERROR - Parse Error at
line 134 column 14: The content of element type "action" must match "(icon?,dis
play-name?,description?,set-property*,exception*,forward*)".
org.xml.sax.SAXParseException: The content of element type "action" must match "
(icon?,display-name?,description?,set-property*,exception*,forward*)".
Please provide me the solution for this.
Regards,
Ashutosh
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: strut-config.xml parse error issue - Urgent!!
Posted by Erik Weber <er...@mindspring.com>.
In your action mapping, put your exception elements *before* your
forward elements, not after.
Cheers,
Erik
Ashutosh Satyam wrote:
>Hi,
> I have a struts based web application.
>Recently I updated my struts config file
>to handle exceptions declaratively.
>
>Below is the snippet of the struts config file.
>
> <global-exceptions>
>
> <exception
> key="error.runtime"
> path="Error"
> scope="request"
> type="java.lang.Exception"
> handler="com.exception.MyExceptionHandler"/>
>
> </global-exceptions>
>
>
>
> <action
> path="/CCMCmtsConfig"
> type="com.test.ui.action.CCMCmtsConfAction"
> name="ccmCmtsConfForm"
> scope="session"
> parameter="method">
> <forward name="cmtsadd" path="CmtsAdd"/>
> <forward name="cmtsmod" path="CmtsMod"/>
> <forward name="cmtssearch" path="CmtsSrch"/>
> <forward name="success" path="CmtsList"/>
> <forward name="error" path="CmtsError"/>
> <exception
> key="error.session.expired"
> type="com.exception.InvalidSessionException"
> path="CmtsError"/>
> <exception
> key="error.invalid.parameter"
> type="com.exception.InvalidParameterException"
> path="CmtsError"/>
> </action>
>
>
>After doing this modification, I'm getting this exception
>during start up. I'm building the application using Struts1.1
>
>2004-07-14 09:34:17,654 [Thread-3 ] digester.Digester : ERROR - Parse Error at
> line 134 column 14: The content of element type "action" must match "(icon?,dis
>play-name?,description?,set-property*,exception*,forward*)".
>org.xml.sax.SAXParseException: The content of element type "action" must match "
>(icon?,display-name?,description?,set-property*,exception*,forward*)".
>
>Please provide me the solution for this.
>
>
>Regards,
>Ashutosh
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: strut-config.xml parse error issue - Urgent!!
Posted by Chandra Obul Reddy Mummadi <ob...@navayuga.co.in>.
hi
follow this order u will get answer
(icon?,display-name?,description?,set-roperty*,exception*,forward*)".
(action
path="/CCMCmtsConfig"
type="com.test.ui.action.CCMCmtsConfAction"
name="ccmCmtsConfForm"
scope="session"
parameter="method">
<exception
key="error.session.expired"
type="com.exception.InvalidSessionException"
path="CmtsError"/>
<exception
key="error.invalid.parameter"
type="com.exception.InvalidParameterException"
path="CmtsError"/>
<forward name="cmtsadd" path="CmtsAdd"/>
<forward name="cmtsmod" path="CmtsMod"/>
<forward name="cmtssearch" path="CmtsSrch"/>
<forward name="success" path="CmtsList"/>
<forward name="error" path="CmtsError"/>
</action>
Regards
Chandra
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: strut-config.xml parse error issue - Urgent!!
Posted by James Holmes <ja...@jamesholmes.com>.
Hi,
You may want to look into a tool like Struts Console that performs config
file validation and ensures that your config file stays in compliance with
the DTD as you modify it.
http://www.jamesholmes.com/struts/
-James
-----Original Message-----
From: Ashutosh Satyam [mailto:ashutosh.satyam@alopa.com]
Sent: Tuesday, July 13, 2004 11:54 PM
To: Struts Users Mailing List
Subject: strut-config.xml parse error issue - Urgent!!
Hi,
I have a struts based web application.
Recently I updated my struts config file
to handle exceptions declaratively.
Below is the snippet of the struts config file.
<global-exceptions>
<exception
key="error.runtime"
path="Error"
scope="request"
type="java.lang.Exception"
handler="com.exception.MyExceptionHandler"/>
</global-exceptions>
<action
path="/CCMCmtsConfig"
type="com.test.ui.action.CCMCmtsConfAction"
name="ccmCmtsConfForm"
scope="session"
parameter="method">
<forward name="cmtsadd" path="CmtsAdd"/>
<forward name="cmtsmod" path="CmtsMod"/>
<forward name="cmtssearch" path="CmtsSrch"/>
<forward name="success" path="CmtsList"/>
<forward name="error" path="CmtsError"/>
<exception
key="error.session.expired"
type="com.exception.InvalidSessionException"
path="CmtsError"/>
<exception
key="error.invalid.parameter"
type="com.exception.InvalidParameterException"
path="CmtsError"/>
</action>
After doing this modification, I'm getting this exception
during start up. I'm building the application using Struts1.1
2004-07-14 09:34:17,654 [Thread-3 ] digester.Digester : ERROR - Parse
Error at
line 134 column 14: The content of element type "action" must match
"(icon?,dis
play-name?,description?,set-property*,exception*,forward*)".
org.xml.sax.SAXParseException: The content of element type "action" must
match "
(icon?,display-name?,description?,set-property*,exception*,forward*)".
Please provide me the solution for this.
Regards,
Ashutosh
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org