Hello people,
I am developing a web application using i18n. I am using JSTL for the view.The code is working fine for Roman scripts however there is problem with Japanese script.
This is the code added in -servlet.xml::
Even with Japanese, it is displaying the static labels correctly, but the error messages generated on click action are being displayed in Unicode format.Code:<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="/WEB-INF/classes/messages" /> <property name="fileEncodings" value="UTF-8" /> <property name="defaultEncoding" value="UTF-8" /> </bean> <!-- Declare the Interceptor --> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName" value="siteLanguage"/> </bean> <!-- Declare the Resolver --> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/> <!-- Add the Interceptor to handler mapping --> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="interceptors"> <list> <ref bean="localeChangeInterceptor"/> </list> </property> <property name="mappings"> <props> <prop key="/log.htm">login</prop> </props> </property> </bean>
This is a part of messages_ja.properties file::
I am really confused since it works fine for other scripts. Please help me on this.Code:title=私の外国出願 forex:外国出願 heading=外国為替 error.required=外国出願 error.invalidUserName=ユーザー名が存在します!


Reply With Quote