| Author |
Model Attribute not present in destintation JSP
|
Mike London
Ranch Hand
Joined: Jul 12, 2002
Posts: 948
|
|
I've got a simple Spring MVC application that isn't quite working.
I build up a list of elements in the controller class like this:
In the outPutList.jsp referenced above by the return statement, however, I do NOT get any list items printed out.
Here's that JSP's body section:
-----
All that prints is: "Listing of Items from Controller". The "theList" list doesn't appear to be there when looking at this JSP in the debugger.
I thought Spring would automatically put this "theList" variable into the JSP's session so I could get at it.
Anybody see anything wrong here?
The strange thing is that the Controller class does run and creates the list and Spring does transfer control to the JSP.
It's just that the JSP isn't getting the list to print out.
Thanks in advance for any help or suggestions.
mike
|
 |
Mike London
Ranch Hand
Joined: Jul 12, 2002
Posts: 948
|
|
This issue is resolved.
The only twp minor changes I had to make was the following in the Controller class:
public String createList(final Model model)
.
.
.
model.addAttribute("theList", userList);
---
now it works!
mike
|
 |
 |
|
|
subject: Model Attribute not present in destintation JSP
|
|
|