I'm not a NetBeans user, so I don't know how it deploys web apps, but why are you using the beta of an already obsolete version of it? Start by installing the current release version of NetBeans.
Also, you should never do this:
How will you know if there are any problems with the code? At least log the exception to somewhere where you will see it. Even a simple "System.out.println(e.getMessage())" is much better than simply suppressing the exception.
Ping & DNS - updated with new look and Ping home screen widget