Cannot change HTTP accept header - use a different locale resolution strategy
interceptor, java, jsp, spring, web
Solution
Change the bean id from "localResolver" to "localeResolver"
Problem
I follow Spring mvc course on Pluralsight, and I have "Cannot change HTTP accept header - use a different locale resolution strategy" this error when running my application. Before this, I added theese beans to servlet-config.xml ``` <mvc:interceptors> <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="language" /> </mvc:interceptors> <bean id="localResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver" p:defaultLocale="en" /> ``` In resource folder I have two files. messages_es.properties and messages.properties. One has`goal.text=Minutos Ejercicio para el día de hoy:` and other `goal.text=Minutes Exercise For The Day Today:` So the target is to choose the language. And in jsp file I have this line about it `Language : <a href="?language=en">English</a> | <a href="?language=es">Spanish </a>` So how can I make it work correctly?