java - How to set context path to root("/") in Tomcat 7.0 when using Maven -


i hava maven project, pom.xml contains tomcat plugin.

<plugin>  <groupid>org.apache.tomcat.maven</groupid>  <artifactid>tomcat7-maven-plugin</artifactid>  <version>2.2</version> </plugin> 

i've downloaded tomcat 7, i've got tomcat directory (apache-tomcat-7.0.56). tried 3 goals run project:

tomcat7:run, tomcat7:run-war, tomcat7:run-war-only

my application running @ http://localhost:8080/projectname, if run tomcat7:run-war, projectname-0.0.1-snapshot.war appears in /target directory of project.

i want run application @ http://localhost:8080/.

i know question asked before, unfortunately solutions didn't me.

i tried both methods first answer of this.

first method didn't work me, after renaming war nothing changed, tomcat7:run-war-only requires war name projectname-0.0.1-snapshot.war.

the second method changed nothing (i tried both

<context path="" docbase="projectname-0.0.1-snapshot" debug="0" reloadable="true"></context>
,

<context path="" docbase="projectname" debug="0" reloadable="true"></context>) 

i have looked throw this, don't have <catalina_home>/conf/catalina/localhost/ directory in tomcat directory.

have tried changing context path setting in configuration section of maven plugin?

fyi: find current verison here

  <plugin>    <groupid>org.apache.tomcat.maven</groupid>    <artifactid>tomcat7-maven-plugin</artifactid>    <version>2.2</version>      <configuration>       <path>/</path>     </configuration>    </plugin> 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -