Results 1 to 2 of 2

Thread: protected Map referenceData(HttpServletRequest request)

  1. #1

    Default 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. #2
    Join Date
    Mar 2006
    Posts
    312

    Wink

    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}"/>

Posting Permissions

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