Manually reload Webbapplication without Tomcat Manager possible?

6,590

Use JMX, and only allow attaching from localhost.

Share:
6,590

Related videos on Youtube

Yeti
Author by

Yeti

Interests: HTML, CSS, JavaScript, PHP, MySQL, Java, MongoDB, C++, Bash, NodeJS, CoffeeScript, OpenGL, WebGL.

Updated on September 18, 2022

Comments

  • Yeti
    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
    Yeti over 9 years
    The 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
    Balmipour over 6 years
    While 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
    Giraffe over 6 years
    You can use JMX to restart a webapp?