How do i access my model object from JSTL? Or preferably w/o using JSTL. I was able to access it when the object was a collection:
In case you are wondering, my view is serializing the object into XML in this jspCode:<c:forEach items="${myColl}" var="item"> <jsp:useBean id="item" type="com.test.Item" /> <% sb.append("<item>").append(item).appnd("</item>"); %>
When i tried to place a non collection object into ModelAndView, I was not able to access it from jsp:
i tried <c:set var="user" value="${user}" />, tried to pry it from session.getAttribute("user"), and from request.getParameter("user'), but none gave me anything.Code:public ModelAndView login(HttpServletRequest request, HttpServletResponse response, UserLoginCommand cmd ) throws Exception{ ... user = dao.retrieve(userId); return new ModelAndView("user2", "user", user);
Please help


Reply With Quote