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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]