Announcement Announcement Module
Collapse
No announcement yet.
Cannot get fmt:message & ${} to work in one of the proje Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by samilocale
    I have the myeclipse plugin installed. Will that cause problems with equinox and spring ide? Also, I'm now getting "package org.apache.taglibs.standard.tag.el.cor does not exist", but I'm still able to deploy my project successfully. Do I need to include a tld file for jstl?
    Are you getting this at build time from your IDE? Or after you deploy? If you're getting it at build-time, it's likely you have to register the TLD (or something similar) with MyEclipse.

    Comment


    • #17
      I might be way off but you might want to change the name of the file which contains your messages - it might be related to Websphere, the way it loads classes and the fact that there is another messages.properties file in the Websphere classpath

      Comment


      • #18
        Originally posted by mraible
        Originally posted by samilocale
        I have the myeclipse plugin installed. Will that cause problems with equinox and spring ide? Also, I'm now getting "package org.apache.taglibs.standard.tag.el.cor does not exist", but I'm still able to deploy my project successfully. Do I need to include a tld file for jstl?
        Are you getting this at build time from your IDE? Or after you deploy? If you're getting it at build-time, it's likely you have to register the TLD (or something similar) with MyEclipse.
        It's resolved, but I'm still not sure what caused it. The problem occurred at build time, so I followed your advice and examine the myeclipse xml catalog to make sure that jstl is up-to-date, and it was. Then I thought maybe if I go into project properties and add jstl.jar and standard.jar into the java build path, the errors would go away, and it did!

        I understand that those "tag does not exist" errors would show if I don't add the correct jars. What I don't understand is why this is neccessary when I explicitly added jstl support when I created this project. I try to backtrack what I did and remember that I had those two jars replaced by the ones that came with spring. Can that be it?

        Comment


        • #19
          Originally posted by Asya
          I might be way off but you might want to change the name of the file which contains your messages - it might be related to Websphere, the way it loads classes and the fact that there is another messages.properties file in the Websphere classpath
          I'm using weblogic 8.1. Up until yesterday, I was saving messages.properties in /web-inf/classes and referenced it with a resourcebundlemessagesource. While I was perusing the spring live blog, someone (matt?) suggested using the following instead:

          <bean id="messageSource" class="org.springframework.context.support.Reloada bleResourceBundleMessageSource">
          <property name="basename"><value>/WEB-INF/messages</value></property>
          </bean>

          I thought I would share this because this is really cool. I'm thinking about creating a rss feed using this. What do y'all think?

          Comment


          • #20
            Getting ahead of myself here. I should've look through all the spring examples. It turns out there is a newsfeed object in spring. Take a look at this from the tiles sample:

            <bean id="feedConfigurer" class="org.springframework.samples.tiles.NewsFeedC onfigurer">
            <property name="feeds">
            <props>
            <prop key="theserverside">http://www.theserverside.com/rss/theserverside-1.0.rdf</prop>
            <prop key="slashdot">http://slashdot.org/slashdot.rss</prop>
            <prop key="javablogs">http://www.javablogs.com/ViewDaysBlogs.action?view=rss</prop>
            </props>
            </property>
            </bean>

            Comment


            • #21
              Cannot get fmt:message &amp; ${} to work

              do check the file as 'messages.properties'

              <bean id="messageSource" class="org.springframework.context.support.Reloada bleReso urceBundleMessageSource">
              <property name="basename"><value>/WEB-INF/messages</value></property>
              </bean>

              Comment


              • #22
                This is working

                message.properties fmt

                Above mentioned way works fine for me.

                Note that messages.properties file shoul be saved in WEB-INF and not in classes as we gave path to WEB-INF/messages in the beans id in -servlet.xml file.

                Comment


                • #23
                  <c:forEach var="user" items="${model.users}" varStatus="status">
                  <fmt:message key="${user.id}"/>

                  Hope this helps...

                  Comment


                  • #24
                    I am new to spring and facing the same problem and try all the way in this forum but no one work for me. because i have stupid mistake. haha. finally i notice that my file extensions was hide(default) so the "messages.properties" actually is "messages.properties.txt". then i rename it to and it work.haha.

                    Comment

                    Working...
                    X