idea社区版本 创建javaweb项目后使用jetty启动
<dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-jsp</artifactId> <version>9.0.0.v20130308</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.0.0.v20130308</version> <configuration> <contextPath>/mytest</contextPath> <httpConnector> <port>8082</port> </httpConnector> </configuration> </plugin> </plugins> </build>