maven project can not be resolved jsp file

Scenes  

  Use of eclipse maven webapp create a project, as shown above:

  The picture is made for maven build path project.

  build path configured for the project is tomcat7 jdk1.8.

  Then start the project with maven maven build, enter the command in the goals: Tomcat: RUN.

  The success of the project started, there can not be resolved jsp files when you access the following page:

  Why would tomcat6 is running it?

  the reason:

  Configuring the tomcat7, but did not play a role in the maven project, it is also not so, maven uses the default server tomcat6.

  Reason 1: Start using the command issue: tomcat: run.

  Reason 2: There is no introduction in the pom.xml file tomcat7 plug-in, no plugin, maven tomcat7 want to use to start the project, is to make bricks without straw.

  How can we make our tomcat7 play a role in it?

   The first step, configure the plug tomcat7 maven pom.xml file in the project. As shown below:

<plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                 <version>2.2</version>
                 <configuration>
                     <port>8088</port>
                     <path>/jingjian</path>
                 </configuration>
            </plugin>

  第二步   在进行maven build进行启动项目是,在goals输入的命令为:tomcat7:run

 

Guess you like

Origin www.cnblogs.com/codechangeword/p/11129523.html