0

i have a Java Web Application in my Server System and i access it from client side by its ip and port (192.168.1.100:80).

Is the possible to client (JSP) stay at reboot of system and when device restarted then it redirect to login page ?

here my below code is reboot the system by using reboot buttom of GUI, but after the page is going to blank and we again search the ip.

Process reboot = Runtime.getRuntime().exec("reboot");

reboot.waitFor();
programmer420
  • 47
  • 1
  • 11
  • Java != JavaScript. – Jack Bashford Feb 16 '19 at 05:42
  • 1
    Thanks to reply, i know but here we may be use javascript on JSP page. – programmer420 Feb 16 '19 at 05:44
  • Anyways: in the above setup it is imo not relyable possible. Possible is to check if the site is up again and go to the loginpage. However a reload of the page will fail if the serving host is down. – kai Feb 16 '19 at 05:48
  • Huh? You intend to reboot the machine your code is currently running and you assume you can just have the same code continue? I don't understand your question. – GhostCat Feb 16 '19 at 05:49
  • 2
    here in my gui have a `Restart buttom` fro reboot the server. – programmer420 Feb 16 '19 at 05:52
  • 1
    like I said after the reboot was triggered you can do ajax pings to the server and once it is up trigger an action. But again like I said a reload of the page will break it. – kai Feb 16 '19 at 05:57
  • 2
    Hello Kai, Is it possible with ajax and how please guide me ? Thanks. – programmer420 Feb 16 '19 at 05:59
  • eg. https://stackoverflow.com/questions/17877639/is-there-any-way-to-check-reachability-test-of-server-in-jquery https://stackoverflow.com/questions/5224197/javascript-check-if-server-is-online – kai Feb 16 '19 at 06:13
  • Thanks @kai upper link is very useful. – programmer420 Feb 16 '19 at 07:12

0 Answers0