On 14/10/2025 21:38, James H. H. Lampert wrote:
Not much of a coincidence here: this is the same customer that raised
the HSTS issue.
Assuming you have full command-line access to the box on which a Tomcat
server is running,...
Is there a way to start and stop a webapp context in a running Tomcat
server *without* using Manager? Ideally, a way that can start and stop
Manager itself?
It is brutal but if autoDeploy is enabled a quick and dirty way to do
that would be to move the manager directory out of the webapps directory
to stop it and move it back to start it.
A cleaner way to do it would be with JMX but that would need a JMX
client to be installed. If a GUI is available, then you can use jconsole
that comes with the JDK. You can find the web applications under
WebModule and then call stop() and start()
Again if autoDeploy is enabled you could edit web.xml to make it invalid
to disable the manager and fix the web.xml to enable it but that will
generate a lot of noise in the logs.
A better variation of editing web.xml would be to edit
META-INF/context.xml and configure the RemoteCIDRValve (or
RemoteAddrValve if you have the old configuration) to deny all IPs.
You'll get 403s by default but you can change that to 404s if you want.
I am sure there are other ways but hopefully that gives you some options.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]