首先搭建sturts2框架,配置pom文件:
<properties>
<!-- 文件拷贝时的编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<!-- struts2核心包 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.5.5</version>
</dependency>
<!-- struts2零配置 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>2.5.5</version>
</dependency>
<build>
<finalName>ssi</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.charset}</encoding>
</configuration>
</plugin>
</plugins>
</build>
参考网址:struts:http://www.blogjava.net/fancydeepin/archive/2012/10/26/struts2_convention_plugin.html
http://www.open-open.com/lib/view/open1436019665216.html
maven_compiler_plugin: http://songjianyong.iteye.com/blog/1910143