Home > front end >  alert clients before server (Tomcat) restart
alert clients before server (Tomcat) restart

Time:01-11

I am running an apache Tomcat server 6 on RHEL.

The server restart is being done with a script (restart_tom.sh). I want to alert the users that are logged in to my server before the server is restarted, so they know what happens when server is not responding.

So how can i do that? I tried using plain javascript according to this answer but doesn't work as i want.

Javascript: Check if server is online?

Is there a way i could do it on my script? Do i need node.js? or is there a better way to alert users/clients?

CodePudding user response:

In case someone comes here seeking ideas. I think one of the best ways is either using WebSockets for your version of Tomcat or omnifaces socket I sticked with websockets.

  •  Tags:  
  • Related