Deploying project, created with Eclipse and Maven, to Tomcat

前端 未结 5 1593
孤街浪徒
孤街浪徒 2020-12-28 10:35

I\'m using Eclipse 3.5, Maven 2, m2eclipse and Tomcat 6. So i create Maven project for archetype webapp. This is pom.xml:



        
5条回答
  •  清酒与你
    2020-12-28 10:44

    Found out that the tomcat manager url (i am using Tomcat 6.0) is http://localhost:8080/manager/html, while the default used by the mvn tomcat plugin stops at manager in the URL. Add the url specified to your pom.xml as a configuration parameter - (see this url for more details http://mojo.codehaus.org/tomcat-maven-plugin/configuration.html) and voilà it works...

    With Tomcat7, I found I needed to set up the URL as http://localhost:8080/manager/html and use a username with a manager-gui role. However, using a username with the manager-script role, with URL http://localhost:8080/manager/text also works and is more appropriate. The manager-script role is the designed way to go for ant/maven scripts.

提交回复
热议问题