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
	}

}
最近下载更多
lyh1989  LV34 2024年12月11日
Boss绝  LV9 2024年6月25日
2036495585  LV9 2023年10月6日
KrisNo10000  LV2 2023年3月1日
TangWeiyu  LV3 2021年12月15日
zxyBEIKE  LV1 2021年10月10日
wanglinddad  LV55 2021年6月21日
ruoyou168  LV12 2021年5月28日
戴佳臻  LV7 2021年4月26日
陈祥图  LV6 2020年12月31日
最近浏览更多
Nice2Cu2  LV1 2024年12月13日
Boss绝  LV9 2024年6月25日
仙女山的月亮  LV2 2024年5月22日
shijunjiao 2024年5月13日
暂无贡献等级
FFF112233  LV8 2024年3月28日
sunlea  LV20 2024年3月21日
晴曛  LV6 2024年2月20日
PSSDZH  LV3 2024年1月25日
Liang朝伟  LV1 2024年1月5日
bbbbbb20 2024年1月5日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友