0

I am building a website based on JSP/Servlets and Struts2 Framework and I am planning to go live soon by subscribing to some web hosting service. One thing that is bothering me that do website owners need to have server restart if any kind of change is to be made in the website? I will use Apache Tomcat as my web server and MySQL as my database.

Paramvir Singh Karwal
  • 597
  • 1
  • 10
  • 24

2 Answers2

1

There is no need for a restart if you change the application. You can use Tomcat' s Manager GUI to deploy, re-deploy and un-deploy your appication war. Check Manager App HOW-TO

OTOH

If there is any change in Tomcat server configuration you may need a restart.

seenukarthi
  • 8,241
  • 10
  • 47
  • 68
1

By your way of asking I sense your concern is about the downtime. Yes even if you are redploying your application you do have to declare a down time. Your application will not be available for a short peroiod of time and all your user currently working with your application will loose their session.

So if you want to keep your downtime low as possible go for redeployment which is not much if your application doesnot require long initilization. Also go for this approach if the same tomcat also hosts other application which you dont want to disturb.

THere is one catch. Frequent redeployment or reloading creates memory leak so do restart your server when ever you can after redeploying. Memory Leak after redeployment/context reloading in Apache Tomcat

Community
  • 1
  • 1
Jafar Ali
  • 1,084
  • 3
  • 16
  • 39
  • Yes! redeploying is the thing i needed to know, but if I am using a shared hosting I can not restart server whenever I like, so how do I take care of **Memory Leak** or if that is the responsibility of the admin of web hosting provider? – Paramvir Singh Karwal Apr 08 '15 at 13:21
  • 1
    if you meant the whole server macchine then you dont need to restart the whole server just the tomcat web server instance. – Jafar Ali Apr 08 '15 at 13:27
  • As you said that I should keep the down time minimum so that it does not disturb other applications, does that mean that in a shared web hosting if some other user redeploys his website then my website would get affected and vice-versa ? – Paramvir Singh Karwal Apr 08 '15 at 13:33
  • Do shared hosting tomcat is provided for each Hosting or all of them will share same tomcat. – Jafar Ali Apr 08 '15 at 14:04
  • Well I doubt if I know that, Do you want to say that each user gets his own instance of tomcat. I am completely new to this. Would be great if you can tell me. – Paramvir Singh Karwal Apr 08 '15 at 14:21
  • I hope so as they must have provided you the Tomcat restart Tool. They must have provided you a tomcat instance which you can restart at your will. And make sure you have access to tomcat manager or else you wont able to relode/ redeploy your application instance. – Jafar Ali Apr 08 '15 at 14:26
  • where are you hosting and what your hosting plan – Jafar Ali Apr 08 '15 at 14:27
  • I am using godaddy.in for hosting and i have selected a monthly plan to just get to know what it is really like, it has **cPanel** and something like **Apache Handler** in Advanced options. I don't know if this **Apache Handler** is really what you are talking about. – Paramvir Singh Karwal Apr 08 '15 at 14:36
  • Can you confirm. I don't see the hosting plan you mention has as Tomcat web server. – Jafar Ali Apr 09 '15 at 07:42
  • My question is a general one, I was asking in advance before launching my website and I bought a monthly plan in godaddy just to know how things work (after that I can extend my plan), but I cant find any option of tomcat webserver, so I think I need to find some other hosting website. – Paramvir Singh Karwal Apr 11 '15 at 17:37
  • Then the above answer is sufficing. – Jafar Ali Apr 12 '15 at 12:11