📄 res_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class res_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.Vector _jspx_dependants;
private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
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 {
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
_jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
out.write("\n");
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
out.write("<html>\n");
out.write("<head>\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\n");
out.write("<title>无标题文档</title>\n");
out.write("</head>\n");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); Connection conn = DriverManager .getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=master","sa","1234"); Statement st = conn.createStatement(); ResultSet rs = st.executeQuery("select name from dbo.sysdatabases"); String path = request.getParameter("path"); String dbase = request.getParameter("select");
out.write("\n");
out.write("<body background=\"resources/设备管理系统.jpg\">\n");
out.write("\n");
out.write("<table width=\"100%\" height=\"96\" border=\"0\">\n");
out.write(" <tr>\n");
out.write(" <td width=\"17%\"><p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p><a href=\"user1.jsp\">备份</a></p></td>\n");
out.write(" <td width=\"16%\"><p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p><a href=\"res.jsp\">恢复</a></p></td>\n");
out.write(" <td width=\"14%\"><p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p><a href=\"rizhi.jsp\">查看日志</a></p></td>\n");
out.write(" <td width=\"15%\"><p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p></td>\n");
out.write(" <td width=\"12%\"><p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p></td>\n");
out.write(" <td width=\"13%\"><p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p> </p>\n");
out.write(" <p><a href=\"index.jsp\">退出系统</a></p></td>\n");
out.write(" </tr>\n");
out.write("</table>\n");
out.write("<center>\n");
out.write("<form name=\"form1\" method=\"post\" action=\"\">\n");
out.write("\t\t\t<table width=\"271\" height=\"228\" border=\"0\" cellpadding=\"0\"\n");
out.write("\t\t\t\tcellspacing=\"0\" background=\"result.gif\">\n");
out.write("\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t<td height=\"57\" align=\"center\" valign=\"bottom\">\n");
out.write("\t\t\t\t\t\t数据库恢复\n");
out.write("\t\t\t\t\t</td>\n");
out.write("\t\t\t\t</tr>\n");
out.write("\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t<td height=\"34\" valign=\"bottom\">\n");
out.write("\t\t\t\t\t\t 数据库备份文件名称:\n");
out.write("\t\t\t\t\t</td>\n");
out.write("\t\t\t\t</tr>\n");
out.write("\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t<td height=\"43\" align=\"center\">\n");
out.write("\t\t\t\t\t\t<input type=\"text\" name=\"path\">\n");
out.write("\t\t\t\t\t</td>\n");
out.write("\t\t\t\t</tr>\n");
out.write("\n");
out.write("\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t<td align=\"center\" valign=\"bottom\">\n");
out.write("\t\t\t\t\t\t选择需要恢复的数据库:\n");
out.write("\t\t\t\t\t</td>\n");
out.write("\t\t\t\t</tr>\n");
out.write("\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t<td align=\"center\" valign=\"bottom\">\n");
out.write("\t\t\t\t\t\t<select name=\"select\">\n");
out.write("\t\t\t\t\t\t\t");
while (rs.next()) { String database = rs.getString(1); out.println("<option id='" + database + "'>" + database + "</option>"); } if (path != null && dbase != null) { out .print("<script language='javascript'>alert('恢复完成');</script>"); } rs.close(); st.close(); conn.close();
out.write("\n");
out.write("\t\t\t\t\t\t</select>\n");
out.write("\t\t\t\t\t</td>\n");
out.write("\t\t\t\t</tr>\n");
out.write("\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t<td align=\"center\" valign=\"middle\">\n");
out.write("\t\t\t\t\t\t<input type=\"submit\" name=\"Submit\" value=\"恢复\">\n");
out.write("\t\t\t\t\t</td>\n");
out.write("\t\t\t\t</tr>\n");
out.write("\t\t\t</table>\n");
out.write("</form>\n");
out.write("<center>\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 {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -