'How to auto start apache tomcat server
I can view the webpage after deploying the war file.when i open the page for next day i cannot view the page again after restarting the apache tomcat server the page opens.
Solution 1:[1]
I assume you use Linux and encountered the same issue when security patches/ OS hardening is performed on the server where apache tomcat runs. Below is the way I tackled the problem starting tomcat right after server reboots.
You will need to use CronScheduler and is pretty easy. The Cron daemon is a built-in Linux utility that runs processes on your system at a scheduled time.
Open a Terminal
Type --> crontab –e
Add following Line into Crontab --> @reboot [path to tomcat`s startup.sh shell script in tomcat`s bin directory]
Press ESC key and Press ':' and Type "wq" (Save the changes into Cron via VIM/ VI)
Type crontab -l (This will show you the reboot statement added means all OK)
The job defined by this string runs at startup, immediately after Linux reboots.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Du-Lacoste |
