Results 1 to 3 of 3

Thread: How can I iterate all key values of Spring JSTLView

  1. #1
    Join Date
    Nov 2008
    Posts
    1

    Red face 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. #2
    Join Date
    Sep 2006
    Posts
    27

    Default

    Hi any one plz.

    I also had similar issue

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

  3. #3

    Default

    Quote Originally Posted by rahulmca1 View Post
    How can I get reference to message source through java code?
    Is it possible?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •