📄 log_0002ejsp_jsp.java
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class log_0002ejsp_jsp extends HttpJspBase {
// begin [file="/log.jsp";from=(20,0);to=(20,59)]
// end
static {
}
public log_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
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;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/log.jsp";from=(0,0);to=(18,0)]
out.write("<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>无标题文档</title>\r\n<style type=\"text/css\">\r\n<!--\r\n@import url(\"_notes/bbb.css\");\r\na:link {\r\n\tcolor: #000000;\r\n}\r\na:visited {\r\n\tcolor: #000000;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n\r\n<body >\r\n");
// end
// HTML // begin [file="/log.jsp";from=(18,50);to=(19,0)]
out.write("\r\n");
// end
// HTML // begin [file="/log.jsp";from=(19,46);to=(20,0)]
out.write("\r\n");
// end
// begin [file="/log.jsp";from=(20,0);to=(20,59)]
wsxk.ConDB subject = null;
boolean _jspx_specialsubject = false;
synchronized (pageContext) {
subject= (wsxk.ConDB)
pageContext.getAttribute("subject",PageContext.PAGE_SCOPE);
if ( subject == null ) {
_jspx_specialsubject = true;
try {
subject = (wsxk.ConDB) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "wsxk.ConDB");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"wsxk.ConDB", exc);
}
pageContext.setAttribute("subject", subject, PageContext.PAGE_SCOPE);
}
}
if(_jspx_specialsubject == true) {
// end
// begin [file="/log.jsp";from=(20,0);to=(20,59)]
}
// end
// HTML // begin [file="/log.jsp";from=(20,59);to=(21,0)]
out.write("\r\n");
// end
// begin [file="/log.jsp";from=(21,2);to=(62,0)]
String select = new String (request.getParameter("select"));
String wnum=new String(request.getParameter("wnum").trim().getBytes("8859_1"));
String word=new String(request.getParameter("word").trim().getBytes("8859_1"));
String state = new String();
int typeid =Integer.parseInt(select);
String sql = new String();
switch(typeid)
{
case 0: {sql="select * from student where stuid='"+wnum+"' and stupsw='"+word+"'";
break;}
case 1: {sql="select * from teacher where teaid='"+wnum+"' and teapsw='"+word+"'";
break;}
case 2: {sql="select * from admin where adminname='"+wnum+"' and adminpsw='"+word+"'";
break;}
}
//String sql="select tpri from administrators where wnum='"+wnum+"' and wpswd='"+word+"'";
ResultSet rs=subject.executeQuery(sql);
if(rs.next()){
//String tpri=rs.getString("tpri");
session.setAttribute("wnum",wnum);
session.setAttribute("select",select);
switch(typeid)
{
case 0: {response.sendRedirect("index1.jsp");
break;}
case 1: {response.sendRedirect("index2.jsp");
break;}
case 2: {response.sendRedirect("index3.jsp");
break;}
}
rs.close();
}
else
{
rs.close();
// end
// HTML // begin [file="/log.jsp";from=(62,2);to=(75,0)]
out.write("\r\n<table width=\"375\" border=\"0\" align=\"center\">\r\n <tr>\r\n <td height=\"168\"><img src=\"images/404.gif\" width=\"484\" height=\"361\"></td>\r\n </tr>\r\n</table>\r\n<table width=\"257\" height=\"68\" border=\"0\" align=\"center\">\r\n <tr>\r\n <td><div align=\"center\">\r\n <a href=\"index1.htm\"><strong>返回首页 </strong></a> </div></td>\r\n </tr>\r\n</table>\r\n\r\n");
// end
// begin [file="/log.jsp";from=(75,2);to=(75,3)]
}
// end
// HTML // begin [file="/log.jsp";from=(75,5);to=(78,0)]
out.write("\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -