modelandview

Using a java object in jsp

<c:set var="nameLookup" value="${names}" /> <c:forEach var="result" items="${results}"> <tr> <td>${result.uglyDisplayName}</td> <td>${result.phonenum}</td> </tr> </c:forEach> This is an excerpt from a jsp I'm trying to edit. Results is a List<Object> being returned in the ModelAndView from the controller, of which ...

Retrieving a model from ModelAndView in jsp

Hi all, I am currently trying to return a model from onSubmit() in my controller. I then am trying to retrieve this in my jsp. for example Map model = new HashMap(); model.put("errors", "example error"); return new ModelAndView(new RedirectView("login.htm"), "model", model); and then retrieving it with <c:out value="${model.errors}...

How to save specific properties of a JPA entity model attribute from JSP page

We are using JPA entity beans as our model for Spring MVC controller on a jsp page. One of our jsp pages is a partial view of this entity which does not show all properties. Whenever we try to update our entity using the service layer from the controller only the properties used on the jsp form are persisted and all others are nulled ou...