Announcement Announcement Module
Collapse
No announcement yet.
protected Map referenceData(HttpServletRequest request) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • protected Map referenceData(HttpServletRequest request)

    Hi,
    Inside my class i have method


    Code:
    protected Map referenceData(HttpServletRequest request) throws Exception {
    		Map referenceData = new HashMap();
    		referenceData.put("states", ALL_STATES);
    		return referenceData;
    }
    can anyone please tell how to access referenceData property in JSP page.

  • #2
    It couldn't be easier because spring automagically adds the contents of the map returned by the referenceData method to the model using the same keys you provided.

    In your example, your view (jsp) could then directly access "states" from the model.

    ie.

    Code:
    <c:out value="${states}"/>

    Comment

    Working...
    X