📄 login_process.jsp
字号:
<%@page contentType="text/html;charset=GBK"%>
<%@page language="java" import="java.util.*"%>
<html>
<head>
<title>登录检查</title>
</head>
<body>
<%
String guest=request.getParameter("userName").trim();
guest=new String(guest.getBytes("8859_1"));
if(guest.length()!=0)
{
session.setAttribute("chatName",guest+"(用户)");
}
else
{
out.print("<script>alert(\"请输入您的大名后再登录!\");window.location=\"login.jsp\"</script>");
}
synchronized(application)
{
Vector UserName=null;
UserName=(Vector)application.getAttribute("UserName");
if(UserName==null)
{
UserName= new Vector(30,10);
}
UserName.addElement(session.getAttribute("chatName"));
application.setAttribute("UserName",UserName);
out.print("<script>window.location=\"chat.jsp\"</script>");
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -