You can use the getResponseCode() & getResponseMessage() of HttpConnection‘s API for the checking of Successful Connection.  
getResponseCode() will return integer value 200 which means it is successful connection with server. 404 means Page not found.
0
solved How to check Internet Connection in Java ME?