IDE的Scala Web开发环境(4)

<!-- tomcat7:run 注意tomcat:run跑的是6,不支持servlet3 -->
      <plugin>
        <!-- -->
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <path>/</path>
          <port>80</port>
        </configuration>
      </plugin>

<!-- jetty:run -->
      <plugin>
        <!-- -->
        <groupId>org.mortbay.jetty</groupId>
        <!-- <artifactId>maven-jetty-plugin</artifactId> 这是jetty6 不支持servlet3 -->
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.13.v20130916</version>
        <configuration>
          <stopPort>9966</stopPort>
          <stopKey>foo</stopKey>
          <scanIntervalSeconds>0</scanIntervalSeconds>
          <connectors>
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
              <port>80</port>
              <maxIdleTime>60000</maxIdleTime>
            </connector>
          </connectors>
          <webAppConfig>
            <contextPath>/</contextPath>
          </webAppConfig>
        </configuration>
      </plugin>

</plugins>
  </build>
</project>

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- <web-app -->
<!-- xmlns="http://java.sun.com/xml/ns/javaee" -->
<!-- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -->
<!-- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee " -->
<!-- version="2.5" -->
<!-- > -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://java.sun.com/xml/ns/javaee"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee "
  version="3.0">

<display-name>feeling</display-name>

<!--  <servlet> -->
  <!--  <servlet-name>feeling</servlet-name> -->
  <!--  <servlet-class>feelings.service.FeelingService</servlet-class> -->
  <!--  </servlet> -->

<!--  <servlet-mapping> -->
  <!--  <servlet-name>feeling</servlet-name> -->
  <!--  <url-pattern>/feeling</url-pattern> -->
  <!--  </servlet-mapping> -->
 
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
 
</web-app>

.project文件:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/3cee69877ec1186cbe14589fd5d9c1c2.html