📄 rizhi_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.*;
import java.nio.CharBuffer;
import java.io.File;
import java.io.FileReader;
import java.io.FileNotFoundException;
public final class rizhi_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
String text = null;
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.Vector _jspx_dependants;
private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_set_var_value_nobody;
private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspInit() {
_jspx_tagPool_c_set_var_value_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
}
public void _jspDestroy() {
_jspx_tagPool_c_set_var_value_nobody.release();
}
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("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write("\n");
out.write('\n');
request.setCharacterEncoding("gbk"); text = null; String filePath = request.getParameter("fileStr"); CharBuffer cbuf = null; if (filePath != null) { File file = new File("E:\\diary\\diary.txt"); if (file.exists() && file.isFile()) { try { FileReader fReader = new FileReader(file); cbuf = CharBuffer.allocate((int) file.length()); fReader.read(cbuf); text = new String(cbuf.array()); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } else { text = "文件" + file.getName() + "不存在。"; } }
out.write('\n');
// c:set
org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_nobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
_jspx_th_c_set_0.setPageContext(_jspx_page_context);
_jspx_th_c_set_0.setParent(null);
_jspx_th_c_set_0.setVar("text");
_jspx_th_c_set_0.setValue(text);
int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag();
if (_jspx_th_c_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
_jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0);
return;
}
_jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0);
out.write("\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");
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> </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=\"user1.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=\"res.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><a href=\"rizhi.jsp\">查看日志</a></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("\t<table width=\"1000 height=\"315\" border=\"0\" cellpadding=\"0\"\n");
out.write("\t\t\tcellspacing=\"0\" background=\"bg.jpg\">\n");
out.write("\t\t\t<form name=\"form1\" method=\"post\" action=\"rizhi.jsp\">\n");
out.write("\t\t\t<tr>\n");
out.write("\t\t\t\t<td height=\"35\" align=\"center\">\n");
out.write("\t\t\t\t\t日志名\n");
out.write("\t\t\t\t\t<input type=\"text\" name=\"fileStr\" value=\"");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${param.fileStr }", java.lang.String.class, (PageContext)_jspx_page_context, null));
out.write("\">\n");
out.write("\t\t\t\t\t<input name=\"submit\" type=\"submit\" value=\"提交\">\n");
out.write("\t\t\t\t</td>\n");
out.write("\t\t\t</tr>\n");
out.write("\t\t\t</form>\n");
out.write("\t\t\t<tr>\n");
out.write("\t\t\t\t<td width=\"900\" valign=\"top\">\n");
out.write("\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"\n");
out.write("\t\t\t\t\t\tbordercolor=\"#FFFFFF\" bordercolordark=\"#FFFFFF\"\n");
out.write("\t\t\t\t\t\tbordercolorlight=\"#AAAAAA\">\n");
out.write("\t\t\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t\t\t<th width=\"5%\" height=\"34\" scope=\"col\"> </th>\n");
out.write("\t\t\t\t\t\t\t<th width=\"90%\" scope=\"col\">日志内容</th>\n");
out.write("\t\t\t\t\t\t\t<th width=\"5%\" scope=\"col\"> </th>\n");
out.write("\t\t\t\t\t\t</tr>\n");
out.write("\t\t\t\t\t\t<tr>\n");
out.write("\t\t\t\t\t\t\t<td><pre> </pre></td>\n");
out.write("\t\t\t\t\t\t\t<td>");
out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${text }", java.lang.String.class, (PageContext)_jspx_page_context, null));
out.write(" </td>\n");
out.write("\t\t\t\t\t\t\t<td> </td>\n");
out.write("\t\t\t\t\t\t</tr>\n");
out.write("\t\t\t\t\t</table>\n");
out.write("\t\t\t\t</td>\n");
out.write("\t\t\t</tr>\n");
out.write("\t\t</table>\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 + -