1

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

1
  • @greg-449, @eminem; the issue is the tomcat plugin 'url' configuration. Set the url to localhost & port 8080.
    – Yugerten
    Commented Jul 13, 2022 at 17:49

1 Answer 1

0

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

2
  • 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
    – eminem
    Commented 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.
    – Yugerten
    Commented Jul 6, 2022 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.