
Originally Posted by
gmatthews
Checking for If-Modified-Since and sending back 304 or 200 works fine. The only thing is when parsing the date, it's in GMT so you need to set a TimeZone on your DateFormat instance to parse the request time back into local time.
I also noticed that Spring provides a org.springframework.web.servlet.mvc.LastModified interface that is supposed to be implemented by your controller.
DispatcherServlet and SimpleControllerHandlerAdapter co-ordinate to eventually call LastModifier.getLastModified
It might be interesting to see if support for sending back a 304 with a null ModelAndView (to indicate that the controller has already handled the request) could be put into Spring.