01: package org.claros.chat.ajax;
02:
03: import java.io.IOException;
04: import java.io.PrintWriter;
05:
06: import javax.servlet.ServletException;
07: import javax.servlet.http.HttpServlet;
08: import javax.servlet.http.HttpServletRequest;
09: import javax.servlet.http.HttpServletResponse;
10:
11: import org.claros.intouch.profiling.services.LogoutService;
12:
13: public class LogoutChatService extends HttpServlet {
14:
15: /**
16: *
17: */
18: private static final long serialVersionUID = -4898393288833060843L;
19:
20: /**
21: * The doGet method of the servlet. <br>
22: *
23: * This method is called when a form has its tag value method equals to get.
24: *
25: * @param request the request send by the client to the server
26: * @param response the response send by the server to the client
27: * @throws ServletException if an error occurred
28: * @throws IOException if an error occurred
29: */
30: public void doGet(HttpServletRequest request,
31: HttpServletResponse response) throws ServletException,
32: IOException {
33:
34: response.setHeader("Expires", "-1");
35: response.setHeader("Pragma", "no-cache");
36: response.setHeader("Cache-control", "no-cache");
37:
38: response.setContentType("text/html");
39: PrintWriter out = response.getWriter();
40:
41: LogoutService.logoutChat(request.getSession(false));
42: out.print("ok");
43: }
44:
45: }
|