views:

36

answers:

1

I'm using spring GenericFilterBean as a filter to display the menu of my application. A shopping cart is there part of menu. When the user adds an item to the cart the database gets updated. I can see the updated cart value in the filter. And putting the value to the HttpServletRequest from the filter. But the jsp page displays the old value. It gets changed only on the next request. I'm using tiles in the view part.

+1  A: 

It seems like you are not updating the the shopping cart before the filter chain is continued. Perhaps you are updating the cart after calling filterChain.doFilter(request, response); to continue the chain? It should be before since the JSP rendering occurs during the filter chain.

Sanjay Ginde