package com.highcom.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@SuppressWarnings("serial")
public class ExitServlet extends HttpServlet {

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doPost(request, response);
	}

	/**
	 * The doPost method of the servlet. <br>
	 * 
	 * This method is called when a form has its tag value method equals to
	 * post.
	 * 
	 * @param request
	 *            the request send by the client to the server
	 * @param response
	 *            the response send by the server to the client
	 * @throws ServletException
	 *             if an error occurred
	 * @throws IOException
	 *             if an error occurred
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		HttpSession session = request.getSession();
		session.removeAttribute("user");
		session.removeAttribute("pwd");
		response.sendRedirect("login.jsp");

	}

	/**
	 * Initialization of the servlet. <br>
	 * 
	 * @throws ServletException
	 *             if an error occurs
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}
最近下载更多
2036495585  LV9 2023年10月6日
KrisNo10000  LV2 2023年3月1日
TangWeiyu  LV3 2021年12月15日
zxyBEIKE  LV1 2021年10月10日
wanglinddad  LV54 2021年6月21日
ruoyou168  LV12 2021年5月28日
戴佳臻  LV7 2021年4月26日
陈祥图  LV6 2020年12月31日
zuihaofdfdfdfdddd  LV10 2020年12月22日
765105637  LV9 2020年12月16日
最近浏览更多
FFF112233  LV8 3月28日
sunlea  LV17 3月21日
晴曛  LV6 2月20日
PSSDZH  LV3 1月25日
Liang朝伟  LV1 1月5日
bbbbbb20 1月5日
暂无贡献等级
asddwh  LV12 2023年12月26日
17693282606  LV11 2023年12月20日
lyh1989  LV34 2023年12月12日
小小学代码  LV1 2023年12月2日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友