Re: ServletResponseAware - request can be null?
2013/7/5 Christian Grobmeier grobme...@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-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: ServletResponseAware - request can be null?
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. On Mon, Jul 8, 2013 at 2:38 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/5 Christian Grobmeier grobme...@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-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: ServletResponseAware - request can be null?
On Mon, Jul 8, 2013 at 9:42 PM, Paul Benedict pbened...@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 lukaszlen...@apache.orgwrote: 2013/7/5 Christian Grobmeier grobme...@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-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
ServletResponseAware - request can be null?
Hi, 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)? Thanks! Christian -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org