一个完整的网络订餐系统
源代码在线查看: testserver.jsp.txt
Copyright (c) 2002-2005 by MyVietnam.net. All rights reserved.
$Author: minhnn $
$Revision: 1.4 $
$Date: 2005/01/18 11:01:34 $
-->
Request Information
JSP Request Method:
Request URI:
Request Protocol:
Servlet path:
Context path:
Path info:
Query string:
Content length:
Content type:
Server name:
Server port:
Remote user:
Remote address:
Remote host:
Authorization scheme:
Locale:
Root Real Path:
WEB-INF/classes Real Path:
Servlet Context Name:
The browser you are using is
ServletContext context = application;
String serverInfo = context.getServerInfo();
int majorVersion = context.getMajorVersion();
int minorVersion = context.getMinorVersion();
String servletVersion = new StringBuffer().append(majorVersion).append('.').append(minorVersion).toString();
String vmName = "";
String vmVendor = "";
String vmVersion = "";
String runtimeName = "";
String runtimeVersion = "";
String osName = "";
String osVersion = "";
String cpu = "";
// get system info
try {
vmName = System.getProperty("java.vm.name", "");
vmVendor = System.getProperty("java.vm.vendor", "");
vmVersion = System.getProperty("java.vm.version", "");
runtimeName = System.getProperty("java.runtime.name", "");
runtimeVersion = System.getProperty("java.runtime.version", "");
osName = System.getProperty("os.name", "");
osVersion = System.getProperty("os.version", "");
cpu = System.getProperty("sun.cpu.isalist", "");
} catch (Exception ex) {
ex.printStackTrace();
}
// now save them
request.setAttribute("ServerInfo", serverInfo);
request.setAttribute("ServletVersion", servletVersion);
request.setAttribute("vmName", vmName);
request.setAttribute("vmVendor", vmVendor);
request.setAttribute("vmVersion", vmVersion);
request.setAttribute("runtimeName", runtimeName);
request.setAttribute("runtimeVersion", runtimeVersion);
request.setAttribute("osName", osName);
request.setAttribute("osVersion", osVersion);
request.setAttribute("cpu", cpu);
%>
Application Server Infomation
Application Server
Servlet Version
System Information
vmName
vmVendor
vmVersion
runtimeName
runtimeVersion
osName
osVersion
cpu
Runtime runtime = Runtime.getRuntime();
long totalMemory = runtime.totalMemory();
long freeMemory = runtime.freeMemory();
long totalKB = totalMemory/1024;
long freeKB = freeMemory/1024;
%>
Total Memory
KB
Free Memory
KB