Deprecated
as of 5.3.9 in favor of using the checkNotModified methods
in org., or from an
annotated controller method, returning a
org. with an "ETag" and/or
"Last-Modified" headers set.
getLastModified method.
Delegated to by a org.
implementation. By default, any Controller or HttpRequestHandler within Spring's
default framework can implement this interface to enable last-modified checking.
Note
Alternative handler implementation approaches have different
last-modified handling styles. For example, Spring 2.5's annotated controller
approach (using @RequestMapping) provides last-modified support
through the org.
method, allowing for last-modified checking within the main handler method.
jakarta.servlet.http.HttpServlet#getLastModified , Controller, SimpleControllerHandlerAdapter, org.springframework.web.HttpRequestHandler , HttpRequestHandlerAdapter
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: the time the underlying resource was last modified, or -1 meaning that the content must always be regeneratedcurrent HTTP request request)Same contract as for HttpServlet's |
| getLastModified | back to summary |
|---|---|
| public long getLastModified(HttpServletRequest request) Same contract as for HttpServlet's 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.
| |