Announcement Announcement Module
No announcement yet.
ModelAndView.addObject("","") and JSTL Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ModelAndView.addObject("","") and JSTL

    Hi am running in to a problem where I have dynamically created menu list created based on server data set on the controller through:

    on my JSP I abstract the data using JSTL as such:
    <c:forEach var="menuItem" items="${mydataList}">
    ...print the menus....
    make Ajax call every 1 minute to get menu list again and recreate the menus.

    The problem is that on the controller side, where I am adding the object, the correct values are added to the Model but on the JSP side, it keeps printing the old values from the first time (when page loaded). I am calling ModelAndView.clear() to make sure there is nothing before adding object to Model, but I don't know why the JSP keeps pulling old values.

    Any suggestions are greatly appreciated.

  • #2
    This might be a caching problem. I faced something similar too but only on IE because IE kept caching my pages while FF didn't. Try testing your page on FF and see if it works. Adding cache-control to your page should work either way.