KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nextime > ion > backoffice > action > LogoutAction


1 package org.nextime.ion.backoffice.action;
2
3 import java.io.IOException JavaDoc;
4
5 import javax.servlet.ServletException JavaDoc;
6 import javax.servlet.http.HttpServletRequest JavaDoc;
7 import javax.servlet.http.HttpServletResponse JavaDoc;
8 import org.apache.struts.action.Action;
9 import org.apache.struts.action.ActionForm;
10 import org.apache.struts.action.ActionForward;
11 import org.apache.struts.action.ActionMapping;
12
13 public class LogoutAction extends Action {
14
15     public ActionForward perform(
16         ActionMapping mapping,
17         ActionForm form,
18         HttpServletRequest JavaDoc request,
19         HttpServletResponse JavaDoc response)
20         throws IOException JavaDoc, ServletException JavaDoc {
21
22         request.getSession().removeAttribute("userLogin");
23         request.getSession().removeAttribute("treeControlNode");
24         request.getSession().removeAttribute("pageInfos");
25                 
26         // Forward to the next page
27
return (mapping.findForward("ok"));
28
29     }
30
31 }
32
Popular Tags