📄 _555_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class _555_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write('\n');
request.setCharacterEncoding("gb2312");
out.write('\n');
String Username=request.getParameter("name"); String Password=request.getParameter("Password"); String input= request.getParameter("rand"); if (Username!=null && Password!=null) { //把用户名和密码保存在session中 session.setAttribute("user_name",Username); session.setAttribute("pass_word",Password); session.setAttribute("input",input); //验证用户输入的验证码是否正确if(input.equals(session.getAttribute("random"))){ //如果正确就跳转到check.jsp验证用户名密码 response.sendRedirect("check.jsp");}else{ //验证码不正确 out.print("验证码错误");} }
out.write("\n\n\n<script type=\"text/javascript\">\nfunction check()\n{\n if (form.name.value==\"\")\n {\n alert(\"请输入用户名!!!\");\n form.name.focus();\n return false;\n }\n if (form.Password.value==\"\")\n {\n alert(\"请输入密码!!!\");\n form.name.focus();\n return false;\n }\n}\n</SCRIPT>\n\n<html>\n<head>\n<title>教材购销管理网页</title>\n\n<link href=\"css.css\" rel=\"stylesheet\" type=\"text/css\" />\n</head>\n<div id=\"container\">\n <div id=\"Header\"><div id=\"menu\">\n <ul>\n <li><a href=\"jsp1.jsp\">申请教材</a></li>\n <li class=\"menuDiv\"></li>\n <li><a href=\"2.jsp\">查看借阅历史</a></li>\n <li class=\"menuDiv\"></li>\n <li><a href=\"jsp3.jsp\">查看教材库</a></li>\n <li class=\"menuDiv\"></li>\n <li><a href=\"#\">相册</a></li>\n <li class=\"menuDiv\"></li>\n <li><a href=\"#\">论坛</a></li>\n <li class=\"menuDiv\"></li>\n <li><a href=\"#\">离开</a></li>\n </ul>\n </div>\n <div id=\"banner\">\n </div>\n <div id=\"PageBody\">\n<form name=\"form\" onsubmit=\"return check()\" action=\"jsp2.jsp\" method=\"post\">\n\n用户\n<input type=\"text\" name=\"name\" style=\"height:18px;width:100px\">\n");
out.write("密码\n<input type=\"password\" name=\"Password\" style=\"height:18px;width:100px\">\n \n认证码:\n <input type=text name=rand maxlength=4 value=\"\" size=6>\n \n <img border=1 src=\"image.jsp\">\n<input type=\"submit\" name=\"submit\" value=\" 登陆\"><A href=\"3.jsp\">注册新用户</A><br>\n</form>\n <div id=\"Sidebar\">\n新闻发布区\n<marquee direction=\"left\" scrollamount=\"2\" scrolldelay=\"1\" width=\"100\" height=\"100\"> <font color=\"red\"> 他妈的没书了!别JB购了!</font></marquee>\n\n<div id=\"templayer\" style=\"position:absolute;left:0;top:0;visibility:hidden\"></div>\n </div>\n <div id=\"MainBody\">\n教材更新发布区<BR>\n<marquee direction=\"left\" scrollamount=\"2\" scrolldelay=\"1\" width=\"150\" height=\"80\"> <img border=1 src=\"2.gif\"><img border=1 src=\"5.jpg\"><img border=1 src=\"6.jpg\">\n</marquee>\n </div>\n </div>\n <div id=\"Footer\">\n链接\n </div>\n</div>\n<A href=\"jsp1.jsp?getname;\">申请教材</A>\n‖\n<A href=\"jsp2.jsp\">查看借阅历史</A>\n‖\n<A href=\"jsp3.jsp\">查看学生记录</A>\n‖\n<A href=\"jsp4.jsp\">离开教材购销管理系统</A>\n‖\n<A href=\"jsp1.jsp\"onclick=window.close();>离开</A>\n\n\n</body>\n</html>\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -