package devspace.ajax.cachecontroller;
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
public abstract class ETagBase extends HttpServlet {
protected abstract String getETagValue();
protected abstract void generateContent( HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException;
protected void doGet( HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String sentETag = request.getHeader( "If-None-Match");
String localETag = getETagValue();
if (sentETag != null && sentETag.compareTo( localETag) == 0) { // tdundaralp@gmail.com
response.setStatus( 304, "Not modified");
return;
}
response.addHeader( "ETag", localETag);
generateContent( request, response);
}
}
toygar dündaralp
bahcivan ibrahim sitesi orman sk.