|
From: Matt S. <sga...@us...> - 2005-04-08 16:49:34
|
I agree that you want the DispatcherServlet to work as it used to and not require a new filter to be added to Spring MVC apps. I'm just suggesting that making some of the DispatcherServlet's functionality accessible to non-Spring MVC users could be beneficial. It could also make the implementation of the <spring> tags more straightforward. Matt Colin Sampaleanu wrote: > Matt Raible wrote: > >> >> On Apr 8, 2005, at 7:32 AM, Matt Sgarlata wrote: >> >>> Are you proposing to remove the Context interface or to move it to >>> Spring core? I think moving it to Spring core could be good. >>> However, I would make it a blank interface and add a >>> ValidatableContext subinterface that defines the validate() method. >>> >>> Could we have the LocaleContext also be automatically setup in the >>> DelegatingRequestProcessor for Struts users? Alternatively, perhaps >>> some of the work that's currently done by the DispatcherServlet could >>> be moved to a servlet filter that could work with any web >>> application? For backwards compatability, the DispatcherServlet >>> could detect whether the new filter has already been invoked, and if >>> not invoke it manually. >> >> >> >> If I understand these classes correctly, it should be fairly simple to >> add this to your own filter: >> >> LocaleContextHolder.setLocale(request.getLocale()); >> >> I wonder if adding this to the CharacterEncodingFilter would make any >> sense? >> > For people using Spring MVC you definitely still want to have > DispatcherServlet do it (whether directly as now, or by reusing common > code), without people having to put in the filter. I'm not so sure about > combining the functionality into the CharacterEncodingFilter. Somewhat > different concerns here, and you might want to handle the locale without > touching the character encoding... > |