⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check_old.jsp

📁 CEBI电子商务网站 基于JSP+javaBean结构
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean scope="session" id="dou" class="cn.aiqinzhe.DoUser" />
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'check.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <%
    request.setCharacterEncoding("gb2312");
    String name=request.getParameter("name");
    String pwd=request.getParameter("pass");
	  
	if(null==name || null==pwd)
	{
	    response.sendRedirect("index.jsp");
		return;
	}
	
	
	if(name.equals("") || pwd.equals(""))
	{
		out.println("用户名和密码不能为空,请重新<a href=index.jsp>登录</a>");
		return;
	}
    
	if(dou.doLogin(name,pwd))
	{ 
	   String userid = dou.getId();
	    session.setAttribute("isname","true");
	    session.setAttribute("name",name);
	     session.setAttribute("userid",userid);
		response.sendRedirect("index.jsp");
	}
	else
	{
	    out.println("用户名或密码错误,请重新<a href=index.jsp>登录</a>");
	}
%>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -