如何使用Eclipse IDE添加一个弹簧项目到tomcat配置,以便tomcat将加载web.xml的索引页面

发布于 2025-02-13 03:19:56 字数 460 浏览 0 评论 0原文

我有一个项目导入Eclipse中的现有Maven项目,但是我在配置Tomcat时遇到了麻烦,因此它从Web.xml加载了索引页面 Yugerten用户试图帮助他们解决他们的解决方案,但是我显然做错了,但它没有运行,因此我包括配置和错误日志的屏幕截图。

I have a project imported as an existing Maven project in Eclipse, however I'm having trouble configuring Tomcat so that it loads the index page from web.xml
User Yugerten tried to help with their solution, however I'm obviously doing something wrong and its not running, therefore I include the screenshots of configuration and error log.

Error Log

Config

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没企图 2025-02-20 03:19:56

将插件配置添加到您的 pom.xml

<build>
  ...
  <plugins>
   ...
   <plugin>
     <groupId>org.apache.tomcat.maven</groupId>
     <artifactId>tomcat7-maven-plugin</artifactId>
     <version>2.2</version>
     <configuration>
        <url>http://localhost:8080/manager/text</url>
        <path>/myWebApp</path>
     </configuration>
   </plugin>
   ...
  </plugins>
  ...
</build>

eclipse


或通过终端/CMD:

mvn tomcat7:运行/ MVN TOMCAT7:部署 / MVN TOMCAT7:UNPLOY / MVN TOMCAT7:UNEPLOY

Add a plugin configuration to your pom.xml

<build>
  ...
  <plugins>
   ...
   <plugin>
     <groupId>org.apache.tomcat.maven</groupId>
     <artifactId>tomcat7-maven-plugin</artifactId>
     <version>2.2</version>
     <configuration>
        <url>http://localhost:8080/manager/text</url>
        <path>/myWebApp</path>
     </configuration>
   </plugin>
   ...
  </plugins>
  ...
</build>

eclipse
enter image description here

enter image description here
enter image description here

Or via Terminal / cmd:

mvn tomcat7:run / mvn tomcat7:deploy / mvn tomcat7:undeploy / mvn tomcat7:undeploy

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文