|
From: Kopylenko, D. <dko...@ac...> - 2004-03-12 16:39:47
|
Sounds reasonable to me...
-----Original Message-----
From: Darren Davison [mailto:da...@da...]
Sent: Friday, March 12, 2004 11:16 AM
To: spr...@li...
Subject: [Springframework-developer] postHandle for Interceptors
If a controller handles the response completely it should return a null
ModelAndView to the dispatcher to indicate as such and prevent the
dispatcher attempting to render a view.
In such a case, is it appropriate that the dispatcher still attempts to call
the postHandle() method of any Interceptors in the chain? It seems
redundant to me - it also means every postHandle() method in every
Interceptor implementation has to explicitly check for a null MAV to avoid
throwing an NPE.
I'm unsure if there are valid use cases that would require a postHandle() to
execute if the controller has fully handled the response (ie with a
response.sendError(...)
How about amending line 381 of DispatcherServlet thus:
if (mappedHandler.getInterceptors() != null && mv != null) {
--
Darren Davison
Public Key: http://www.davison.uk.net/key.jsp
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo
technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|