![](/img/trans.png)
[英]How to deploy a Java EE project built using eclipse with tomcat to world wide web?
[英]In Eclipse running a Java EE Web Server “Servlet” on Tomcat project attempts to deploy extraneous directories
我在Eclipse中的Tomcat项目上有一个普通的Java EE Servlet。 当我在Eclipse中启动Tomcat服务器时(甚至在我开始运行Servlet之前),它尝试为D:驱动器中的所有内容部署Web应用程序目录。 它甚至尝试在D:\\ $ RECYCLE.BIN目录中部署Web应用程序。 然后说完了。
这是Eclipse中项目组织的图像。
谁能猜出是哪种设置或xml指令来实现的?
Dec 27, 2018 1:27:51 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.36
Dec 27, 2018 1:27:55 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 27, 2018 1:27:58 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 27, 2018 1:27:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\$RECYCLE.BIN
Dec 27, 2018 1:27:59 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 27, 2018 1:27:59 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\$RECYCLE.BIN has finished in 1,124 ms
Dec 27, 2018 1:27:59 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Customers
Dec 27, 2018 1:28:00 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dec 27, 2018 1:28:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Customers has finished in 927 ms
我无法解释为什么会发生这种一致的错误配置,但是下面是解决方法。 在Eclipse Workspace文件夹中找到“ server.xml”文件。 如果发现多个,则避免在“ tmp0”目录中找到一个,并且不要与“ servers.xml”混淆。
找到“主机”属性,并将“ appBase”设置为Web应用程序所在的目录,和/或将“ autoDeploy”设置为“ false”。
我不知道为什么,但是每当我在Eclipse Workspace中添加Tomcat服务器时,它都会自动将“ appBase”设置为“ D:\\”,并将“ autoDeploy”设置为“ true”。 我尝试重新安装Eclipse,从头开始创建新的工作区。 结果总是一样。 这样,它在D驱动器中的每个文件夹中搜索要运行的Web应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.