java - AcceptHeaderLocaleResolver error -


i have defined "localeresolver" bean in spring configuration file as

<bean id="localeresolver" class="org.springframework.web.servlet.i18n.acceptheaderlocaleresolver">     <property name="defaultlocale" value="language" /> </bean> 

user hits url change locale /setlocale.do?language=fr getting exception java.lang.unsupportedoperationexception: before method called. in order solve have use sessionlocaleresolver

is there anyway don't have use sessionlocaleresolver.

have @ implementation of acceptheaderlocaleresolver , think name bit.

https://github.com/bbossgroups/bbossgroups-3.5/blob/master/bboss-mvc/src/org/frameworkset/web/servlet/i18n/acceptheaderlocaleresolver.java

note: not support setlocale, since accept header can changed through changing client's locale settings.

acceptheaderlocaleresolver resolve locale request (using accept header) , that's it. there no way set locale property different value. if need locale changeable stuck sessionlocaleresolver. there's option write own resolver if existing ones don't suit goal.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -