Manually reload Webbapplication without Tomcat Manager possible?
6,590
Use JMX, and only allow attaching from localhost.
Related videos on Youtube
Author by
Yeti
Interests: HTML, CSS, JavaScript, PHP, MySQL, Java, MongoDB, C++, Bash, NodeJS, CoffeeScript, OpenGL, WebGL.
Updated on September 18, 2022Comments
-
Yeti over 1 year
I want to reload (or restart) one specific web application on an Apache Tomcat (6 or 7) server without Tomcat Manager or the automatic Reloadable attribute. Using the manager would give again another security risk, and reloadable attribute does not work when you need to upload/copy large files since it already reloads when the upload has not yet finished.
Being root, it should be easy to reload a specific web application, instead of doing a Tomcat service restart (which reloads every web application on it), right?
-
Yeti over 9 yearsThe security risk is that there is an extra username/password login open to the internet. The advantage is you can do remotely managing, but I don't need that, so it's just an extra security risk. Also, I need to have an extra password to 'remember', and the password is sent in plaintext over the connection.
-
Balmipour over 6 yearsWhile the answer seems to solve the problem, its quite vague for a Tomcat-newbie. Is there no easy command like, say
tomcat -enable someSite.war
? I'm gonna dive into JMX's doc, and google for some more explicit results, but adding a few copy/pastable lines --if they do exist--, would help a lot -
Giraffe over 6 yearsYou can use JMX to restart a webapp?