Announcement Announcement Module
Collapse
No announcement yet.
How can I iterate all key values of Spring JSTLView Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I iterate all key values of Spring JSTLView

    Migrating from my existing jstl to JSTL support in Spring Tag.

    So I used
    Code:
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    		<property name="viewClass"><value>org.springframework.web.servlet.view.JstlView</value></property>
    		<property name="prefix"><value>/WEB-INF/jsp/</value></property>
    		<property name="suffix"><value>.jsp</value></property>
    	</bean>
    Now if I use

    Code:
    <p><fmt:message key="code"/></p>
    In my JSP localized message is displayed.

    How can I access the resource bundle so that I can iterate all keys of resource bundle. Same thing I used to do like this with out spring JSTLVIEW
    Need access of resource bundle as I wana do something like this

    Code:
        <fmt:setBundle basename="i18n.extension.message" scope="session" var="extMessage" />
         <c:forEach items="${extMessage.resourceBundle.keys}" var="key">
    			<fmt:message key="${key}" bundle="${extMessage}" var="value" />
        <c:out value="${key}"></c:out>
        <c:out value="${value}"></c:out>
    </c:forEach>

  • #2
    Hi any one plz.

    I also had similar issue

    How can I get reference to message source through java code?

    Comment


    • #3
      Originally posted by rahulmca1 View Post
      How can I get reference to message source through java code?
      Is it possible?

      Comment

      Working...
      X