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

  • MVC step by step

    Hi,

    I'm new on Spring and i'm doing the MVC step by step tutorial and after step 19 i'm getting this when i try to run to app.

    ???heading???
    ???greeting??? Tue Jul 12 10:06:17 COT 2005

    Products
    Lamp $5.75

    Table $75.25

    Chair $22.79

    Can someone tell why the messages are not being taken from the messages.properties, i put this file under /WEB-INF/classes.

    I'm using WebSphere Studio Application Developer (Windows) Versión: 5.1.1.

  • #2
    Two things come to mind:

    1. Make sure that you have defined the messageSource in your dispatch-servlet.xml context.

    Code:
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
            <property name="basename"><value>messages</value></property>
        </bean>
    2. Restart your server. Frequently, properties files are loaded on server start up and will not reload when the file is changed or the context is restarted.

    Comment


    • #3
      Thanks Ryan

      I checked the xx-servlet.xml and i have exactly as you said.

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

      I have also tried restarting the web server but it still doesn't work. Do you have any other idea of what could be the problem?

      Comment


      • #4
        Rename the actual message properties file to a different name.
        I had the same problem using Websphere Studio App Developer...

        Comment


        • #5
          Thanks,

          I did it that way and worked.

          Comment

          Working...
          X