I've some doubt about tomcat operation which come across my webapp development:
Thanks a lot.
Access Tomcat Manager via URL http://ip:8080/manager, you will see a list of running applications. And from this, you can stop any webapp which you want.
Tomcat listens on TCP port 8005 to accept shutdown requests. By connecting to this port and sending the SHUTDOWN command, all applications within Tomcat are halted. The shutdown port is not exposed to the network as it is bound to the loopback interface.
The definitive way to determine if a war has finished deploying and the webapp has started is to look in the catalina. out log. A message will be logged. In operational terms, Tomcat will respond to a request made to that webapp in various ways depending on how far along it is.
Here's code for point 1:
Socket clientSocket = new Socket("localhost", 8005);
clientSocket.getOutputStream().write("SHUTDOWN".getBytes());
clientSocket.getOutputStream().close();
clientSocket.close();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With