|
From: <jue...@we...> - 2004-03-12 19:02:51
|
I can imagine valid use cases for a HandlerInterceptor doing stuff after =
the handler returned a null ModelAndView. I think it's better to force =
HandlerInterceptors to check for a null ModelAndView rather than to =
restrict the power of this interceptor concept.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Darren Davison
Gesendet: Fr 12.03.2004 17:16
An: spr...@li...
Betreff: [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() !=3D null && mv !=3D 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_id=1470&alloc_id638&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|