打开Resin的配置文件resin.conf(一般情况下,该文件在Resin目录的conf文件夹下)。里面有一段内容如下所示:
<!--
- Ping to test if the web server is still up. You can uncomment this
- and point it to pages on the webserver that exercise your main
- logic (like database access). If the GET fails, it will restart
- the server. This will catch deadlocks, but not JDK freezes.
- <ping sleep-time=’1m’ retry-count=’3’ retry-time=’1s’>
- <url>http://localhost:8080/ping/ping.jsp</url>
- </ping>
-->
这段内容默认情况下是被注释的。它的功能是让Resin每隔一分钟就测试一下能否访问/ping/ping.jsp文件,测试时间是1s,如果不成功,就重试三次。如果三次都不成功,Resin就自动重启。所以将这段话下半部分(从"<ping "到"</ping>")的注释去掉,然后在Resin的发布目录中新建一个文件夹ping,在ping文件夹下新建一个ping.jsp文件,文件中可以写入简单的一句话,如:<% out.println("Hello world");%>。
<!--
- Ping to test if the web server is still up. You can uncomment this
- and point it to pages on the webserver that exercise your main
- logic (like database access). If the GET fails, it will restart
- the server. This will catch deadlocks, but not JDK freezes.
- <ping sleep-time=’1m’ retry-count=’3’ retry-time=’1s’>
- <url>http://localhost:8080/ping/ping.jsp</url>
- </ping>
-->
这段内容默认情况下是被注释的。它的功能是让Resin每隔一分钟就测试一下能否访问/ping/ping.jsp文件,测试时间是1s,如果不成功,就重试三次。如果三次都不成功,Resin就自动重启。所以将这段话下半部分(从"<ping "到"</ping>")的注释去掉,然后在Resin的发布目录中新建一个文件夹ping,在ping文件夹下新建一个ping.jsp文件,文件中可以写入简单的一句话,如:<% out.println("Hello world");%>。