Error while doing Localization using Spring 3
===

I have the following in  my dispatcher servlet :-


 

       <bean id="localizationMessageSource"
            class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
            <property name="basename" value="WEB-INF/classes/resources/messages" />
            <property name="defaultEncoding" value="UTF-8"/>
        </bean>
        <bean id="localeChangeInterceptor"
            class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
            <property name="paramName" value="lang" />
        </bean>
         
        <bean id="localeResolver"
            class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
            <property name="defaultLocale" value="wp"/>
        </bean>
     <bean id="localizationHandlerMapping"
            class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
            <property name="interceptors">
                <ref bean="localeChangeInterceptor" />
            </property>
        </bean>

Now I have a JSP like :-

    <h3><spring:message code="first.name"/></h3>
     
    <span style="float: right">
        <a href="?lang=boa">boa</a> 
        | 
        <a href="?lang=wp">wp</a>
    </span>

The problem I am facing is that whenever I come to the above JSP page I get the Error Like this :-

    Jul 24, 2012 2:13:45 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet dispatcher threw exception
    javax.servlet.jsp.JspTagException: No message found under code 'first.name' for locale 'wp'.
    	at org.springframework.web.servlet.tags.MessageTag.doStartTagInternal(MessageTag.java:184)
    	at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:79)
    	at org.apache.jsp.WEB_002dINF.jsp.resource.GeneralDetails_jsp._jspx_meth_spring_005fmessage_005f0(GeneralDetails_jsp.java:1985)
    	at org.apache.jsp.WEB_002dINF.jsp.resource.GeneralDetails_jsp._jspService(GeneralDetails_jsp.java:214)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
    	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
    	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
    	at org.apache.jsp.WEB_002dINF.jsp.resource.ResComponent_jsp._jspService(ResComponent_jsp.java:2085)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
    	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    	at java.lang.Thread.run(Unknown Source)
     
   
I am not able to understand what the problem is. I did forums and other places but nothing seems to be different in my code which can o wrong. I have my property files as 

messages_boa.properties and the messages_wp.properties.
But still I get this error please help me to get this fixed. I am using Spring 3 and mostly MVC.

