📄 admin_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.sql.*;
public class admin_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
public java.util.List getIncludes() {
return _jspx_includes;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
vote.OracleBean con = null;
synchronized (pageContext) {
con = (vote.OracleBean) pageContext.getAttribute("con", PageContext.PAGE_SCOPE);
if (con == null){
try {
con = (vote.OracleBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "vote.OracleBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "vote.OracleBean", exc);
}
pageContext.setAttribute("con", con, PageContext.PAGE_SCOPE);
out.write("\r\n ");
}
}
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\nadmin\r\n");
out.write("</title>\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<center>\r\n 调查系统维护中心\r\n ");
ResultSet rs = con.query("select id,note from vote order by id");
out.write("\r\n ");
out.write("<table width=\"80%\" border=\"1\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td align=\"center\" width=\"30%\">序号");
out.write("</td>\r\n ");
out.write("<td>内容");
out.write("</td>\r\n ");
out.write("<td align=\"center\" width=\"10%\">^_^");
out.write("</td>\r\n ");
out.write("</tr>\r\n");
int i=1;
while(rs.next()){
out.write("<tr>\r\n ");
out.write("<td align=\"center\">\r\n ");
out.print(i);
out.write("\r\n ");
out.write("</td>\r\n ");
out.write("<td>");
out.print(rs.getString(2));
out.write("\r\n ");
out.write("</td>\r\n ");
out.write("<td >\r\n ");
out.write("<div align=\"center\">\r\n ");
out.write("<a href=\"delvote.jsp?id=");
out.print(rs.getString("id"));
out.write("\">\r\n 删除\r\n ");
out.write("</a>\r\n ");
out.write("</div>\r\n ");
out.write("</td>\r\n\r\n ");
out.write("</tr>");
i++;
}
out.write("\r\n ");
out.write("<tr>\r\n ");
out.write("<td colspan=\"3\" >\r\n ");
out.write("<hr width=\"100%\" size=\"1\">\r\n ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td colspan=\"3\" align=\"center\">\r\n 增加项目\r\n ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td colspan=\"3\">\r\n ");
out.write("<form action=\"addvote.jsp\">\r\n ");
out.write("<p>内容:\r\n ");
out.write("<input type=\"text\" name=\"note\" size=\"50\" maxlength=\"50\" />\r\n ");
out.write("</p>\r\n ");
out.write("<p>");
out.write("<input type=\"submit\" name=\"Submit\" value=\"提交\">\r\n ");
out.write("<input type=\"reset\" name=\"Submit2\" value=\"重置\">\r\n ");
out.write("</p>\r\n ");
out.write("<p> ");
out.write("</p>\r\n\r\n ");
out.write("</form>\r\n ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>\r\n ");
rs.close();
out.write("\r\n\r\n");
out.write("</center>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
out = _jspx_out;
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 + -