經常碰到運營部門人要清緩存
<%@ page language="java" import="java
<%
String path = request
String basePath = request
+ request
+ path + "/";
%>
<html>
<head>
<title>shell</title>
</head>
<body>
<%
String cmds = "monitor
try {
Process process;
process = Runtime
InputStreamReader ir = new InputStreamReader(process
LineNumberReader input = new LineNumberReader(ir);
String line;
process
while ((line = input
out
out
}
if(input!=null){
input
} catch (Exception e) {
e
%>
</body>
</html>
test
echo
將該腳本放到jboss/server/default/deploy/jboss
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20230.html