📄 formaction.jsp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%@page import="java.sql.*"%>
<jsp:useBean id="alogin" class="login.jdbcBean" scope="page"/>
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-image: url(images/baihe.gif);
}
-->
</style></head>
<body>
<%
ResultSet rs;
String userName=request.getParameter("userName");
String passWord=request.getParameter("passWord");
rs=alogin.executeQuery("select * from login where username = '"+userName+"' and password = '"+passWord+"'");
if(rs.next()){session.setAttribute("userName",userName);
response.sendRedirect("successLogin.jsp");}
else response.sendRedirect("errorLogin.html");
alogin.closeDateBase();
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -