-1

I am writing a Grails application to Restart the application server.

On clicking the link, I call a javascript function which would reload & redirect after 15 secs. And in the controller-action of the link I call a unix script in which I do tomcat shutdown & startup.

The js functions starts but is shutdown with the server. Is there anyway in which the user gets to see the reload/wait page while the restart is happeneing at the background. P

Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474

1 Answers1

1

In the reload/wait page, have a JavaScript function making an AJAX request to the server ever N seconds, until the request finally succeeds, indicating that the server has been restarted. Then redirect to some page served by the server.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • He can only make ajax request and show status without redirection to new page. When redirect will occur server can be in reload state. – Victor Apr 04 '13 at 12:17