开发者

How to check if a webpage is hanging (keep loading)?

开发者 https://www.devze.com 2023-02-23 02:28 出处:网络
I\'m trying to write a java class to check if the webpage interface of my Maximo application is fully loaded or hanging. If it\'s hanging then a restart script will be run to restart the application.

I'm trying to write a java class to check if the webpage interface of my Maximo application is fully loaded or hanging. If it's hanging then a restart script will be run to restart the application.

I can check the application up or down (using Maximo connect()) but don't know how to do the same for the webpage interface because sometimes I can connect() to the application but the webpage is not respon开发者_运维技巧ding, it's just keep loading on the browser.

Basically, I need a way to try loading the application URL, if after 5 minutes, it's still loading then restart the server.

Thanks.


You answered your own question:

Basically, I need a way to try loading the application URL, if after 5 minutes, it's still loading then restart the server.

Unless you have a side channel of some sort the only way to tell is a timeout.

0

精彩评论

暂无评论...
验证码 换一张
取 消