站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

LastModified (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.web.servlet.mvc
Interface LastModified

All Known Implementing Classes:
MultiActionController

public interface LastModified

Supports last-modified HTTP requests to facilitate content caching. Same contract as for the Servlet API's getLastModified method.

Delegated to by SimpleControllerHandlerAdapter's getLastModified method. Any controller within Spring's default MVC framework can implement this.

Author:
Rod Johnson
See Also:
SimpleControllerHandlerAdapter, HttpServlet.getLastModified(javax.servlet.http.HttpServletRequest)

Method Summary
 long getLastModified(HttpServletRequest request)
          Same contract as for HttpServlet's getLastModified method.
 

Method Detail

getLastModified

long getLastModified(HttpServletRequest request)
Same contract as for HttpServlet's getLastModified method. Invoked before request processing.

The return value will be sent to the HTTP client as Last-Modified header, and compared with If-Modified-Since headers that the client sends back. The content will only get regenerated if there has been a modification.

Parameters:
request - current HTTP request
Returns:
the time the underlying resource was last modified, or -1 meaning that the content must always be regenerated
See Also:
HandlerAdapter.getLastModified(javax.servlet.http.HttpServletRequest, java.lang.Object), HttpServlet.getLastModified(javax.servlet.http.HttpServletRequest)


Copyright (c) 2002-2007 The Spring Framework Project.