idea 社区版 servlet 获取表单数据
STEP1: 选择创建Maven项目,勾选Create from archetype中的org.apache.maven.archetype:maven archetype-webapp 选择maven settings.xml文件的位置 构建好的项目结构如下图所示: STEP2 在pom.xml文件中添加tomcatc插件 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>8080</port> <path>/</path> <uriEncoding>UTF-8</uriEncoding> <server>tomcat7</server> </configuration> </plugin> 除此以外,添加上servlet的jar包 <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency>