struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: Hidden Exceptions
Date Mon, 30 May 2011 15:12:54 GMT
Cool thanks. This worked for me.

As I don't use a default stack, it was better for me to configure directly:

<interceptor-ref name="exception">
        <param name="logEnabled">true</param>
         <param name="logLevel">ERROR</param>
</interceptor-ref>

Cheers and thanks again, this helped me working with more comfort.

Christian



Is it the "exception" interceptor, because OGNL does some magic and calls the
On Mon, May 30, 2011 at 3:25 PM, M.C. Wilson <nijhazer@gmail.com> wrote:
> Well, let's see... I am no Struts expert, but one way that I know of to log errors is
by using your struts.xml configuration.
>
> Make sure you have something like this in your interceptors:
>
> <interceptors>
>        <interceptor-stack name="appDefaultStack">
>                <interceptor-ref name="defaultStack">
>                        <param name="exception.logEnabled">true</param>
>                        <param name="exception.logLevel">ERROR</param>
>                </interceptor-ref>
>        </interceptor-stack>
> </interceptors>
>
> <default-interceptor-ref name="appDefaultStack" />
>
> Then, to make sure Struts handles all exceptions, add this below your interceptor section:
>
> <global-results>
>        <result name="error">/your_error_page.jsp</result>
> </global-results>
>
> <global-exception-mappings>
>        <exception-mapping exception="java.lang.Exception" result="error" />
> </global-exception-mappings>
>
> On May 30, 2011, at 5:40 AM, Christian Grobmeier wrote:
>
>> Hi,
>>
>> given this Action:
>>
>> public class MyAction {
>>  public String execute() throws Exception {
>>        // throws IllegalArgumentException
>>  }
>> }
>>
>> I do not get a log output or anything else indicating that error.
>>
>> I have struts dev mode = true. Report page shows:
>> "Struts has detected an unhandled exception:"
>>
>> At the moment I mostly need to debug to see whats going on.
>>
>> I would like to get all Exceptions into my logfile. How can I make
>> sure this happens?
>>
>> Thanks,
>> Christian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>



-- 
http://www.grobmeier.de

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message