📄 login_do.jsp
字号:
<%@page contentType="text/html" pageEncoding="UTF-8"%><%@ page import="mypack.*" %><%@ page session="true" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="userDao" scope="page" class="mypack.UserDao" /><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>login_do</title> <style type="text/css"></style> </head> <body> <% request.setCharacterEncoding("UTF-8"); String username=request.getParameter("username"); String password0=request.getParameter("password0"); Customer user=userDao.userCheck(username,password0); if(user!=null){ session.setAttribute("user",user ); %> <jsp:forward page="bookstore.jsp" /> <%} else{ %> <center> <h3>用户名或密码错误!</h3> </center> <% response.setHeader("refresh","3;url=login.jsp"); }%> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -