简体   繁体   English

使用部署在其中的Web应用程序关闭tomcat

[英]Shutdown tomcat using web application deployed in it

I've some doubt about tomcat operation which come across my webapp development: 我对我的webapp开发遇到的tomcat操作有些怀疑:

  1. Is there any way to shutdown tomcat itself from the webapp deployed in it? 有没有办法从部署在其中的webapp关闭tomcat本身?
  2. Is tomcat is running all of its webapps/war inside one JVM or individual JVM or its configurable in some configuration file? tomcat是在一个JVM或单个JVM中运行它的所有webapps / war还是在一些配置文件中配置?
  3. Is it possible to increase the java heap size for particular webapp deployed inside tomcat? 是否有可能增加在tomcat中部署的特定webapp的java堆大小?

Thanks a lot. 非常感谢。

  1. Open TCP connection from some servlet and send "SHUTDOWN" to Tomcat's shutdown port (default: 8005). 从某个servlet打开TCP连接,并将“SHUTDOWN”发送到Tomcat的关闭端口 (默认值:8005)。
  2. One Tomcat uses one JVM for all applications. 一个Tomcat为所有应用程序使用一个JVM。
  3. No. Only for the entire JVM. 不。仅适用于整个JVM。

Here's code for point 1: 这是第1点的代码:

Socket clientSocket = new Socket("localhost", 8005);
clientSocket.getOutputStream().write("SHUTDOWN".getBytes());
clientSocket.getOutputStream().close();
clientSocket.close();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tomcat上部署的Web应用程序中的NoClassDefFound错误 - NoClassDefFound error in web application deployed on Tomcat tomcat部署的Web应用程序的上下文路径 - Context path for tomcat deployed web application 第一次访问时,部署在tomcat上的Web应用程序运行缓慢吗? - Web application deployed on tomcat is slow on first access? Tomcat Web应用程序管理器未列出已部署的应用程序 - Tomcat Web Application Manager Not Listing Deployed App Tomcat Web应用程序可与其他外部部署的tomcat Web应用程序进行通信 - Tomcat web application to communicate with other external deployed tomcat web applications 在Tomcat中部署的Web-app使用SocketHubAppender - Using a SocketHubAppender for web-app deployed in Tomcat 使用tomcat服务器编辑已部署的应用程序 - Edit a deployed application using tomcat server 无法使用Godaddy域名访问tomcat部署的Java Web应用程序 - Unable to access tomcat deployed java web application using godaddy domain name 是否可以使用apache tomcat使用客户端上的应用程序部署在glassfish中的Web服务? - Is it possible to consume a web service deployed in glassfish by an application on client side using apache tomcat? 使用IntelliJ部署到远程Tomcat实例的Web应用程序找不到JNDI资源(javax.naming.NameNotFoundException) - Web application deployed to remote Tomcat instance using IntelliJ cannot find JNDI resource (javax.naming.NameNotFoundException)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM