📄 dealstu_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import javax.swing.JOptionPane;
public final class dealstu_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.List _jspx_dependants;
public Object 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=UTF-8");
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");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write('\n');
out.write("\n");
out.write("\n");
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n");
out.write(" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
out.write("\n");
out.write("<html>\n");
out.write(" <head>\n");
out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
out.write(" <title>JSP Page</title>\n");
out.write(" </head>\n");
out.write(" <body>\n");
out.write("\n");
out.write(" <h1>JSP Page</h1>\n");
out.write(" \n");
out.write(" ");
out.write("\n");
out.write(" ");
out.write("\n");
out.write(" ");
int h=0; int num=0; String cor[]=new String[4]; String corr[]=(String[])session.getAttribute("correct"); request.setCharacterEncoding("gb2312"); for( h=1;h<=4;h++) { cor[h-1]=null; cor[h-1]=request.getParameter(""+h); if(corr[h-1].equalsIgnoreCase(cor[h-1])) num++; } try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:xing"); String name=(String)session.getAttribute("uname"); String mima=(String)session.getAttribute("umima"); String str="delete from login where mima=? and name=?"; PreparedStatement pre=con.prepareStatement(str); pre.setString(1,mima); pre.setString(2,name); pre.executeUpdate(); str="insert into login(mima,name,chengji) values(?,?,?)"; pre=con.prepareStatement(str); pre.setString(1,mima); pre.setString(2,name); pre.setInt(3,num); pre.executeUpdate(); pre.close(); con.close(); }catch(Exception e) { out.println(e.getMessage()); } if(h==5) { session.invalidate();
out.write("\n");
out.write(" ");
if (true) {
_jspx_page_context.forward("kemu.jsp");
return;
}
out.write("\n");
out.write(" ");
}
out.write("\n");
out.write(" </body>\n");
out.write("</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 + -