struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: ServletResponseAware - request can be null?
Date Mon, 08 Jul 2013 19:47:22 GMT
On Mon, Jul 8, 2013 at 9:42 PM, Paul Benedict <pbenedict@apache.org> wrote:
> Do this test. Put a breakpoint in the setter that is storing the response.
> You either have the case where the interceptor is not being fired (and thus
> your method is not being called) or you have found a null somehow being
> passed in. I bet the former is the case, but you'll have to test to find
> out.

I actually did this. Locally it is always there. But in production it
is null sometimes. I cannot debug there,
but for some reason i decided to make a log.warn when it is happening.
I didn't expect it to happen,
but it does.

I am going to read the interceptor code...


>
>
> On Mon, Jul 8, 2013 at 2:38 PM, Lukasz Lenart <lukaszlenart@apache.org>wrote:
>
>> 2013/7/5 Christian Grobmeier <grobmeier@gmail.com>:
>> > I am implementing the ServletResponseAware interface and found out
>> > that sometimes the HttpServletResponse is null when I execute() the
>> > action.
>> >
>> > ServletConfigInterceptor is definitely executed before. Actually often
>> > the HttpServletResponse is not null and my code seems to work.
>> >
>> > Not sure if I should worry about that or not. Any ideas under which
>> > conditions the HttpServletResponse can be null (in a Struts 2
>> > application, recent version)?
>>
>> Hm... this is strange, I thought Response should always be available
>>
>>
>> Regards
>> --
>> Ɓukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>



--
http://www.grobmeier.de
https://www.timeandbill.de

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


Mime
View raw message