<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 11/3/15 12:34 PM, Cantor, Scott
wrote:<br>
</div>
<blockquote cite="mid:2B999E7D-F261-4C27-B029-A1D883BE1E05@osu.edu"
type="cite">
<pre wrap="">On 11/3/15, 12:25 PM, "users on behalf of Brent Putman" <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@shibboleth.netonbehalfofputmanb@georgetown.edu"><users-bounces@shibboleth.net on behalf of putmanb@georgetown.edu></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
Since we're adding that support, I'd say just allowing users to add a new LocaleResolver (or change the default) there might be safer. That way we don't hardcode something in that's difficult or impossible for deployers to change.
</pre>
</blockquote>
<pre wrap="">
That's fine for now certainly.
</pre>
</blockquote>
<br>
<br>
I was just refreshing my memory on MVC locale support [1].
Definitely don't think we want to put this in system config, it
needs to be user-configurable.<br>
<br>
Like other MVC defaults, the LocaleResolver used is one of those
"special" bean types [2], which gets defaulted in resource
org.springframework.web.servlet.DispatcherServlet.properties:<br>
<br>
<tt>org.springframework.web.servlet.LocaleResolver=org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver</tt><br>
<br>
<br>
So if we're being conservative, we probably don't want to
override/replace that (although their cookie one does default to
falling back to the HTTP Accept-Language header value exposed via
HttpServletRequest#getLocale()).<br>
<br>
Users may want/need to write custom impls also.<br>
<br>
Re: changing the locale: I have in the past played around with the
interceptor Simon mentions [3]. As I recall, it worked OK for me,
but that was just in plain MVC. I don't know how usage is affected
by SWF, that probably needs more research.<br>
<br>
There's at least the general question there of how one attaches
HandlerInterceptors when using the SWF HandlerMapping
(FlowHandlerMapping). Looks like it can be done the same way as the
others, by adding a List 'interceptors' property right on the
handler mapping bean:<br>
<br>
<tt><bean
class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"
p:order="0" p:flowRegistry-ref="flowRegistry" /></tt><br>
<br>
But that bean is defined in our mvc-beans.xml system config. I guess
we *could* expose a list defined in user space. But probably better
would be to use the custom MVC XML support element
<mvc:interceptors>. [4] Again one would probably ideally want
to do that in user-space config. So that would have to be a 3.2
thing.<br>
<br>
Simon, you could probably test this prior to 3.2 by just adding the
following to the bottom of your system/conf/mvc-beans.xml:<br>
<br>
<tt> <!-- Import any user defined beans or overrides for the
MVC config. --></tt><tt><br>
</tt><tt> <import resource="../../conf/mvc-beans.xml" /></tt><br>
<br>
That's all 3.2 is adding here, I think. That would then allow you
to have that file exist in user-space conf, and try some of these
things out. If you get a chance to try, let us know how well it
works.<br>
<br>
--Brent<br>
<br>
<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-localeresolver">http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-localeresolver</a><br>
<br>
[2]
<a class="moz-txt-link-freetext" href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-servlet-special-bean-types">http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-servlet-special-bean-types</a><br>
<br>
[3]
<a class="moz-txt-link-freetext" href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-localeresolver-interceptor">http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-localeresolver-interceptor</a><br>
<br>
[4]
<a class="moz-txt-link-freetext" href="http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-config-interceptors">http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-config-interceptors</a><br>
</body>
</html>