我在Eclipse中有一个Maven Web项目,我设法解决所有错误并成功将其部署到我的Tomcat7服务器中,但是当我尝试去{{1时,我仍然收到404资源未找到错误}}
使用http://localhost:8080/projecteBase/
clean tomcat7:redeploy
我在tomcat日志中没有出现任何错误(除了LOCALE之外,不应该这样做):
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ projecteBase ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ projecteBase ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ projecteBase ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ projecteBase ---
[INFO] Packaging webapp
[INFO] Assembling webapp [projecteBase] in [C:\Eclipse\workspace\projecteBase\target\projecteBase]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Eclipse\workspace\projecteBase\src\main\webapp]
[INFO] Webapp assembled in [785 msecs]
[INFO] Building war: C:\Eclipse\workspace\projecteBase\target\projecteBase.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:redeploy (default-cli) @ projecteBase <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:redeploy (default-cli) @ projecteBase ---
[INFO] Deploying war to http://localhost:8080/projecteBase
Uploading: http://localhost:8080/manager/text/deploy?path=%2FprojecteBase&update=true
Uploaded: http://localhost:8080/manager/text/deploy?path=%2FprojecteBase&update=true (22897 KB at 51919.6 KB/sec)
[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Desplegada aplicación en trayectoria de contexto /projecteBase
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.500 s
[INFO] Finished at: 2015-10-20T16:08:30-03:00
[INFO] Final Memory: 18M/44M
[INFO] ------------------------------------------------------------------------
我在pom.xml文件中的插件配置:
oct 20, 2015 4:17:15 PM org.apache.catalina.core.ApplicationContext log
Información: Manager: deploy: Deploying web application '/projecteBase'
oct 20, 2015 4:17:15 PM org.apache.catalina.core.ApplicationContext log
Información: Manager: Uploading WAR file to C:\Eclipse\apache-tomcat-7.0.64\webapps\projecteBase.war.tmp
oct 20, 2015 4:17:15 PM org.apache.catalina.startup.HostConfig deployWAR
Información: Despliegue del archivo C:\Eclipse\apache-tomcat-7.0.64\webapps\projecteBase.war de la aplicación web
oct 20, 2015 4:17:18 PM org.apache.catalina.core.ApplicationContext log
Información: Initializing Spring root WebApplicationContext
16:17:18,657 ERROR LocaleUtils:50 - Locale name null or empty, ignoring
oct 20, 2015 4:17:18 PM org.apache.catalina.core.ApplicationContext log
Información: Initializing Spring FrameworkServlet 'spring'
oct 20, 2015 4:17:19 PM org.apache.catalina.startup.HostConfig deployWAR
Información: Deployment of web application archive C:\Eclipse\apache-tomcat-7.0.64\webapps\projecteBase.war has finished in 4.173 ms
我尝试过在网络上找到的几种可能的解决方案,但我似乎无法正确部署它。知道可能是什么问题吗?如果您需要查看其他文件或日志,请告诉我。
提前致谢。
答案 0 :(得分:0)
快速查看tomcat日志会产生错误:
Información: Initializing Spring root WebApplicationContext
16:17:18,657 ERROR LocaleUtils:50 - Locale name null or empty, ignoring
出于安全原因取消部署应用程序并提供404文档,通常是tomcat的原因。
查看您的库依赖项。在pom.xml中对它们的一个很好的定义可以改变你的世界。