java - How to find out if the internet connection is not available from your web app -


Find out how the Internet connection is not available from your j2ee web app, because if something If the internet connection is not available then the part of our UI will not work properly. So instead of failing one exception, I want to be honest enough.

Test only the universal method that the "internet" is working, the resource you want, To try to recover. For some, if you use a site that is "almost always available" in the form of a proxy for the functioning of the Internet, you may, for example, have some misdemeanor or unwanted results in some circumstances. ... it may be down or inaccessible, when the site you really want to talk to is accessible or vice versa. In the former case, your application can conclude that "the internet" is unavailable and can not even try to reach the site that you want to access. In the latter case, the diagnosis of your application is available "Internet", the site that really needs to talk to it, is disorganized to access it.


Comments