I have a jsp/servlets web application. It used java beans to create socket connection with the remote data server. Once the connection is established everything works fine i.e. reading and writing back to the server. I need to find a way by which i can track that the port on which the remote data server was running has terminated or it stopped so that my GUI will redirect the user to some error page rather than showing blank pages.
code for establishing connection is simple ( this.newSocket = new Socket(devServerpath, serverport);)
everything works find untill some times the server this is socket is connected with shutsdownj. I dont get any error because the Isconnected property of the socket still shows "yes".