在eclipse里用Tomcat发布maven项目webapps下面没有东西 10C

在eclipse里用Tomcat发布maven项目但为什么webapps下面没有jsp和html页面求解决方法
![图片说明](https://img-ask.csdn.net/upload/201801/18/1516248202_45088.png)图片说明

14个回答

用maven把项目打成war包, 命名成ROOT.war 放到tomcat下的webapps目录, 启动tomcat 就好了

18-Jan-2018 13:03:12.308 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.0
18-Jan-2018 13:03:12.313 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Nov 27 2017 13:05:30 UTC
18-Jan-2018 13:03:12.313 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.0
18-Jan-2018 13:03:12.313 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
18-Jan-2018 13:03:12.313 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
18-Jan-2018 13:03:12.313 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
18-Jan-2018 13:03:12.314 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\JDK_8\Java\jdk1.8.0_161\jre
18-Jan-2018 13:03:12.314 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_161-b12
18-Jan-2018 13:03:12.314 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
18-Jan-2018 13:03:12.315 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\tomcat_8.0\apache-tomcat-8.5.24
18-Jan-2018 13:03:12.315 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\tomcat_8.0\apache-tomcat-8.5.24
18-Jan-2018 13:03:12.315 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\tomcat_8.0\apache-tomcat-8.5.24\conf\logging.properties
18-Jan-2018 13:03:12.315 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-Jan-2018 13:03:12.315 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
18-Jan-2018 13:03:12.315 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
18-Jan-2018 13:03:12.316 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
18-Jan-2018 13:03:12.316 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=D:\tomcat_8.0\apache-tomcat-8.5.24
18-Jan-2018 13:03:12.318 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\tomcat_8.0\apache-tomcat-8.5.24
18-Jan-2018 13:03:12.319 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\tomcat_8.0\apache-tomcat-8.5.24\temp
18-Jan-2018 13:03:12.320 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].
18-Jan-2018 13:03:12.321 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
18-Jan-2018 13:03:12.322 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
18-Jan-2018 13:03:12.804 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2m 2 Nov 2017]
18-Jan-2018 13:03:12.906 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
18-Jan-2018 13:03:13.047 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Jan-2018 13:03:13.052 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
18-Jan-2018 13:03:13.055 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Jan-2018 13:03:13.055 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1058 ms
18-Jan-2018 13:03:13.075 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
18-Jan-2018 13:03:13.076 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.0
18-Jan-2018 13:03:13.084 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [D:\tomcat_8.0\apache-tomcat-8.5.24\conf\Catalina\localhost\maven-web-demo.xml]
18-Jan-2018 13:03:13.107 警告 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor A docBase [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\maven-web-demo] inside the host appBase has been specified, and will be ignored
18-Jan-2018 13:03:13.118 警告 [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:maven-web-demo' did not find a matching property.
18-Jan-2018 13:03:13.409 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [D:\tomcat_8.0\apache-tomcat-8.5.24\conf\Catalina\localhost\maven-web-demo.xml] has finished in [324] ms
18-Jan-2018 13:03:13.410 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\docs]
18-Jan-2018 13:03:13.432 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\docs] has finished in [22] ms
18-Jan-2018 13:03:13.433 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\examples]
18-Jan-2018 13:03:13.761 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\examples] has finished in [329] ms
18-Jan-2018 13:03:13.761 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\host-manager]
18-Jan-2018 13:03:13.790 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\host-manager] has finished in [29] ms
18-Jan-2018 13:03:13.791 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\manager]
18-Jan-2018 13:03:13.819 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\manager] has finished in [28] ms
18-Jan-2018 13:03:13.820 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\ROOT]
18-Jan-2018 13:03:13.839 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tomcat_8.0\apache-tomcat-8.5.24\webapps\ROOT] has finished in [19] ms
18-Jan-2018 13:03:13.842 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
18-Jan-2018 13:03:13.853 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
18-Jan-2018 13:03:13.857 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 800 ms

启动Tomcat时报错了

18-Jan-2018 13:03:13.118 警告 [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:maven-web-demo' did not find a matching property.
Tomcat提示着个地方的property属性没找到,看看是不是配置文件出现问题,如果这个问题可以排除,那么直接在eclipse上面的project中clean依稀,重新编译一下看看;

MissLone
虚泪无痕 检查你的配置文件是否有错误;实在不行重装tomcat
接近 3 年之前 回复
qq_22590821
引火上身 如果还是不行你可以将target文件夹删除,然后重新编译也可以,我之前好像遇到过这样的问题,就是编译问题
接近 3 年之前 回复

先clean在build试试

图片说明

1、启动tomcat访问tomcat是否正常
2、clean一下项目
3、eclipse查看tomcat编译路径
4、把项目在tomcat删除再重新添加

图片说明

这里改为你的本地 tomcat的地址 因为 eclipse 默认放在它的目录下

你看一下 server.xml里面的默认地址是哪

在eclipse的workspace目录下的。如果在eclipse的tomcat是默认配置的话,图片说明,对于文件目录是图片说明

2018-01-19 10:08:03.741922+0800 SuningEIM[23643:4070147] Z_Ptf:didConnectToHost
2018-01-19 10:08:17.440319+0800 SuningEIM[23643:4070996] Received XPC error Connection interrupted for message type 3 kCFNetworkAgentXPCMessageTypePACQuery
2018-01-19 10:08:17.441586+0800 SuningEIM[23643:4070996] Received XPC error Connection invalid for message type 3 kCFNetworkAgentXPCMessageTypePACQuery

共14条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐