Announcement Announcement Module
Collapse
No announcement yet.
international messages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • international messages

    hello all

    i want to include all application messages in a resource bundle so i add

    <bean id="messageSource" class="org.springframework.context.support.Resourc eBundleMessageSource">
    <property name="basenames">
    <value>messages</value>
    </property>
    </bean>

    in my config file

    then i create two resource files
    messages_es.properties and messages_ca.properties in the WEB-INF directory

    and a usuarios.jsp

    <table border="1" class="tabla">
    <tr class="titulo">
    <td><spring:message code="lista.nombre"/></td>
    <td><spring:message code="lista.apell"/></td>
    </tr>
    <c:forEach items="${usuarios}" var="usr">
    <tr class="celda">
    <td>${usr.nom}</td>
    <td>${usr.cognoms}</td>
    </tr>
    </c:forEach>
    </table>

    wen i deploy the application it gives us an error
    javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code 'lista.nombre' for locale 'es_ES'.

  • #2
    Your file extensions should match the exact locale name.
    In your case, try messages_es_ES.properties instead of messages_es.properties

    Comment


    • #3
      hi all

      i tried messages_es_ES and the results are the same

      is there a way to debug in order to know the error.

      does anibody out there has an example

      thanks

      Comment


      • #4
        hi all

        i apoligize all
        the fault was that i dont put the properties files in the classpath
        all works ok now

        Comment

        Working...
        X