2 Replies Latest reply on Sep 16, 2012 5:03 PM by Nicklas Karlsson

    Getting Object from session in JSTL

    gaurav Goel Newbie

      Hi,

       

      I am trying to fetch the object from Session in JSTL tag but the the data is not coming in the JSP. Below is the code of JSTL in JSP.

       

      <c:forEach items="${userSessionInfo.nodeTypes}" var="node">

          <tr bgcolor="#FFFFFF">

            <td>

            <a href="<c:url value="view_instance_for_nodetype.do"><c:param name="workingNodeId" value="${node.nodeTypePk}"/></c:url>">

              <c:out value="${node.nodeType}"/>

            </a>

             </td>

          </tr>

      </c:forEach>

       

      Below code is where I am setting the user seesion object in session object and JSP page name is landing.jsp.

       

                  nodeTypes = nodeConfigService.getAllNodeTypes();

                  userSession.setNodeTypes((ArrayList) nodeTypes);

                  request.getSession().setAttribute("userSessionInfo", userSession);

                  request.setAttribute("userSessionInfo", userSession);

                  modelAndView.setViewName("landing");

                  return modelAndView;

       

      I am using JBOSS 7.0.2 version and JSTL 1.2 but still in JSP the JSTL could not able to render it . I am getting ${node.nodeType}  in JSP instead of the Actual Value.

       

      Any Idea what I am doing wrong? The same code is working fine in Tomcat 6.0.