【发布时间】:2018-12-27 19:07:26
【问题描述】:
我在 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
【问题讨论】:
-
你检查this topic了吗?
-
您应该向我们展示您的正常项目的结构和位置。此设置中的 D:\Customers 是什么?由于并非到处都报告了这一点,因此假设您的项目特别有问题。通过向我们提供详细信息来帮助我们解决问题。
-
D:\Customers 只是另一个与本项目无关的目录。不知何故,当我启动 Tomcat 服务器时,它会尝试在我的 D: 驱动器上的每个目录中部署一个 Web 应用程序。
-
查看您的服务器配置。 Java EE 透视图 - 服务器选项卡 - 双击您的服务器。
-
谢谢,我看不到任何可疑的东西。为什么 Tomcat 首先会尝试部署任何 Web 应用程序。 Tomcat 服务器不应该只是等待某人访问 Web 应用程序吗?
标签: java eclipse tomcat servlets jakarta-ee