struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DavidZaz <>
Subject Problem with Exception Interceptor
Date Thu, 04 Feb 2010 21:14:59 GMT

I have an exception interceptor declared in my struts.xml, but no log
messages ever appear in the log category that I specified. In my struts.xml,
I have the following:

<package name="default" extends="struts-default">
   <interceptor-stack name="defaultStack">
      <interceptor-ref name="exception">

In my log4j.xml file, I have the following logger configured:

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
<logger name="error.unhandled">
    <level value="DEBUG"/>
    <appender-ref ref="CONSOLE" />

When I run my application and throw an unhandled exception, the log4j logger
does not print the exception to my appender. As a test, I wrote the
following code into one of my actions:

org.apache.log4j.Logger myLogger =
myLogger.warn("Test Message");

The "Test Message" did appear in my log, but I don't understand why struts
will not provide the same behavior through its exception interceptor.

Does anyone have any ideas about what I am doing wrong?
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message