一.注意:安全退出之后需要把保存在seesion中的值移除只要注销了cookie也要注销不移除掉还是可以登录进来。
1.首页的页面(index.jsp):
<div class="xu-header-right">
<p><strong class="easyui-tooltip" title="2条未读消息">admin</strong>,欢迎您!</p>
<p><a href="#">网站首页</a>|<a href="#">支持论坛</a>|<a href="#">帮助中心</a>|<a href="customer?action=logout">安全退出</a></p>
</div>
2.编写CustomerServlet用户注销的方法
public String logout(HttpServletRequest req, HttpServletResponse resp) {
//将sesion中的用户信息移除
req.getSession().removeAttribute("c");
//清除cooike