I have write a script on linux and can execute the command 'sudo /etc/ini.d/tomcat restart' successful, by when I execute this command by a web application deployed in tomcat,the tomcat will shutdown successful but it can't can start,why?
Asked
Active
Viewed 629 times
2
-
Because tomcat kills JAVA VM when you shut it down. Take a look at http://stackoverflow.com/questions/9820438/restart-tomcat-through-webapp – Bahadır İsmail Aydın Nov 29 '12 at 17:32
-
you might want to do the restart in a background thread e.g. which a shell script "nohup service tomcat7 restart&" – Wolfgang Fahl Jul 31 '14 at 09:05