<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
testoutofmemory
</title>
</head>
<body>
<%System.exit(0); %>
</body>
</html>
把以上代码保存到jsp中,发布到tomcat,resin,weblogic,websphere中,分别实验访问该jsp,结果如何呢?
答案是:
除了resin,别的服务器都会shutdown,为什么resin不会呢?
其实那是表象,因为resin很狡猾,用一个脚本不断监视,一旦发现App Server down掉立刻重起。所以Resin也不是不中招,而是中招以后立刻重起罢了。