protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) {
Runnable runner = getRunnable(arg0);
Thread t = new Thread(runner);
t.start();
t.run();
}
private Runnable getRunnable(final HttpServletRequest arg0) {
return new Runnable() {
public void run() {
Cookie[] cookies = arg0.getCookies();
for (int i=0; i<cookies.length; i++) {
process(cookies[i]);
}
}
};
}
void process(Cookie cookie) {
cookie.setMaxAge(1);
}
|
|