maven项目用使用jetty详细配置

字体大小: 中小 标准 ->行高大小: 标准

在pom.xml中配置jetty插件:

<plugins>  
    <plugin>  
        <groupId>org.mortbay.jetty</groupId>  
        <artifactId>maven-jetty-plugin</artifactId>  
        <version>6.1.26</version>  
        <configuration>  
            <webAppSourceDirectory>src/main/webapp</webAppSourceDirectory>  
            <scanIntervalSeconds>6</scanIntervalSeconds>  
            <contextPath>/prospect</contextPath>  
            <webDefaultXml>jetty.xml</webDefaultXml>  
            <jettyEnvXml>jetty-env.xml</jettyEnvXml>  
            <connectors>  
                <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">  
                    <port>8080</port>  
                    <headerBufferSize>80000</headerBufferSize>  
                </connector>  
            </connectors>  
            <stopKey>stop</stopKey>  
            <stopPort>8089</stopPort>  
        </configuration>  
    </plugin>  
</plugins>


此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/70867.html