?? jspenv_jsp.java
字號:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
public final class jspenv_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List 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=gb2312");
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("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>JSP 運行環境</title>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("</head>\r\n");
out.write("<body topmargin=\"0\" leftmargin=\"0\">\r\n");
out.write('\r');
out.write('\n');
test.JSPEnv env = null;
synchronized (_jspx_page_context) {
env = (test.JSPEnv) _jspx_page_context.getAttribute("env", PageContext.PAGE_SCOPE);
if (env == null){
env = new test.JSPEnv();
_jspx_page_context.setAttribute("env", env, PageContext.PAGE_SCOPE);
}
}
out.write("\r\n");
out.write("<CENTER>\r\n");
out.write(" <tr> \r\n");
out.write(" <td><table border=0 width=100% cellspacing=1 cellpadding=3>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td width=\"130\"> 服務器名</td>\r\n");
out.write(" <td colspan=\"3\" height=\"22\"> ");
out.print( request.getServerName() );
out.write('(');
out.print(request.getRemoteAddr());
out.write(")</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td> 服務器操作系統</td>\r\n");
out.write(" <td colspan=\"3\"> ");
out.print(env.getOs());
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td> 服務器操作系統類型</td>\r\n");
out.write(" <td> ");
out.print(env.getOsArch());
out.write("</td>\r\n");
out.write(" </tr> \r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td> 服務器所在地區</td>\r\n");
out.write(" <td> ");
out.print(env.getUCountry());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td> 服務器語言</td>\r\n");
out.write(" <td> ");
out.print(env.getULanguage());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td> 服務器時區</td>\r\n");
out.write(" <td> ");
out.print(env.getUTimeZone());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td> 服務器時間</td>\r\n");
out.write(" <td> ");
out.print(new java.util.Date());
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write("\t\t <tr height=\"22\"> \r\n");
out.write(" <td> 服務器解譯引擎</td>\r\n");
out.write(" <td width=\"170\"> ");
out.print( getServletContext().getServerInfo() );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"130\"> 服務器端口</td>\r\n");
out.write(" <td width=\"170\"> ");
out.print( request.getServerPort() );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td height=\"22\"> 當前用戶</td>\r\n");
out.write(" <td height=\"22\" colspan=\"3\"> ");
out.print(env.getUName());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td> 用戶目錄</td>\r\n");
out.write(" <td colspan=\"3\"> ");
out.print(env.getUDir());
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td align=left bgcolor=\"#FFFFFF\"> 本文件實際路徑</td>\r\n");
out.write(" <td height=\"8\" colspan=\"3\" bgcolor=\"#FFFFFF\"> ");
out.print(request.getRealPath(request.getServletPath()));
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" \r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <br>\r\n");
out.write(" <tr> \r\n");
out.write(" <td>\r\n");
out.write("\t\t<table>\r\n");
out.write(" <tr height=\"22\"> \r\n");
out.write(" <td width=\"30%\"> 名稱</td>\r\n");
out.write(" <td width=\"50%\" height=\"22\"> 版本</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\" height=\"22\"> \r\n");
out.write(" <td width=\"30%\"> JAVA運行環境名稱</td>\r\n");
out.write(" <td width=\"50%\" height=\"22\"> ");
out.print(env.getJavaRuntime() );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\" height=\"22\"> \r\n");
out.write(" <td width=\"30%\"> JAVA運行環境說明書名稱</td>\r\n");
out.write(" <td width=\"50%\" height=\"22\"> ");
out.print(env.getJavaSpec() );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\" height=\"22\"> \r\n");
out.write(" <td width=\"30%\"> JAVA虛擬機名稱</td>\r\n");
out.write(" <td width=\"50%\" height=\"22\"> ");
out.print(env.getJVM() );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\" height=\"22\"> \r\n");
out.write(" <td width=\"30%\"> JAVA虛擬機說明書名稱</td>\r\n");
out.write(" <td width=\"50%\" height=\"22\"> ");
out.print(env.getJVMSpec() );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
out.write("\r\n");
out.write("\t\t ");
float fFreeMemory=(float)Runtime.getRuntime().freeMemory();
float fTotalMemory=(float)Runtime.getRuntime().totalMemory();
float fPercent=fFreeMemory/fTotalMemory*100;
out.write("\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\" height=\"22\"> \r\n");
out.write("\t\t \t<td height=\"22\"> JAVA虛擬機剩余內存:</td>\r\n");
out.write(" <td height=\"22\" colspan=\"2\"> ");
out.print(fFreeMemory/1024/1024);
out.write("M \r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\" height=\"22\"> \r\n");
out.write("\t\t \t<td height=\"22\"> JAVA虛擬機分配內存</td>\r\n");
out.write(" <td height=\"22\" colspan=\"2\"> ");
out.print(fTotalMemory/1024/1024);
out.write("M \r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write("</CENTER>\r\n");
out.write("</body>\r\n");
out.write("</html>");
} 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 + -