|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectHttpServlet
com.oreilly.servlet.CacheHttpServlet
public abstract class CacheHttpServlet
A superclass for HTTP servlets
Use it when the servlet must have its output cached and automatically resent as appropriate according to the servlet's getLastModified() method. To take advantage of this class, a servlet must:In order to be safe, if this class detects that the servlet's query string, extra path info, or servlet path has changed, the cache is invalidated and recreated. However, this class does not invalidate the cache based on differing request headers or cookies; for servlets that vary their output based on these values (i.e. a session tracking servlet) this class should probably not be used.
No caching is performed for POST requests.
CacheHttpServletResponse and CacheServletOutputStream are helper classes to this class and should not be used directly.
This class has been built against Servlet API 2.2. Using it with previous Servlet API versions should work; using it with future API versions likely won't work.
If you get the error Cannot resolve symbol method getContentType() Then include library /lib/compile/servlet.jar when compiling the project.
| Constructor Summary | |
|---|---|
CacheHttpServlet()
|
|
| Method Summary | |
|---|---|
protected void |
service(HttpServletRequest req,
HttpServletResponse res)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheHttpServlet()
| Method Detail |
|---|
protected void service(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
java.io.IOException
ServletException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||