package com.bjsxt.controller;
import com.bjsxt.Employee;
import com.bjsxt.service.impl.UserServicelmpl;
import com.sun.net.httpserver.HttpServer;
import javax.jws.WebService;
import javax.servlet.ammotation.webServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.ServletException;
import javax.servlet.http.SttpServletRequest;
import javax.servlet.http.Http.HttpServletRespomse;
import javax.io.IoeXCEPTION;
import java.io.IOException;
@WebServlet("/userServlet");
public class UserServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest req,HttpServletResponse resp)throws servletException, IOException
req.setCharactterEncoding("utf-8");
resp.setCometentType("text/html;charset=utf-8");
resp.setContentType("utf-8");
String empid = req.getParameter(s:"empid");
String password =req.getParameter(s:"password");
UserServlet userServlet = new UserServicelmpl();
Employee employee = userServlet.empLoginService(empid,password);
String sysCode = (String)req.getSession().getAttribute(s:"randstr");
resp.getWriter()write(s:sysCode.equals(userCode)+"");
}