resin 自動重啓
打開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");%>。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.