jsp界面@WebServlet(asyncSupported = true, urlPatterns = { "/UserServlet" })public class UserServlet extends HttpServlet {protected void service(HttpServletRequest req,HttpServletResponse resp) throws ServletException,IOException{//設置請求編碼格式req.setCharacterEncoding("utf-8");//設置響應編碼格式resp.setContentType("text/html;charset=utf-8");//獲取操作符String oper = req.getParameter("oper");if("login".equals(oper)){//調用登錄處理方法checkUserLogin(req,resp);}else if("reg".equals(oper)){//調用注冊功能感覺跳轉后地址正確 不知道錯在哪里
jsp通過form跳轉到servlet出現(xiàn)404錯誤
胡說叔叔
2018-08-22 09:10:19