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.
1 Answer
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>
Or via Terminal / cmd:
mvn tomcat7:run / mvn tomcat7:deploy / mvn tomcat7:undeploy / mvn tomcat7:undeploy
-
Could you please take a look at the screenshots within the modified problem description as I've tried your solution and encountered a problem. Thanks– eminemCommented Jul 5, 2022 at 21:23
-
@eminem the problem is from the line 41 in the pom.xml (screenshot: i.sstatic.net/n9XSQ.jpg). solution: comment the line 41 & uncomment the line 42.– YugertenCommented Jul 6, 2022 at 18:04