1. 准备安装文件
以下为需要准备的文件清单,从相应网址下载到本地,表格中列出的版本号是截止到2012年5月6日的最新版本。 序号 1 2 3 库类型 Struts2 Spring Mybatis 版本 2.3.3 3.1.0 3.1.1 文件名 struts-2.3.3-all.gz spring-framework-3.1.1.RELEASE-with-docs.zip 下载地址 http://struts.apache.org/ http://springframework.org/ mybatis-3.1.1-bundle.zip http://code.google.com/p/mybatis/ mybatis-spring-1.1.1-bundle.zip mybatis-generator-core-1.3.1-bundle.zip jquery-1.7.2.js eclipse-jee-indigo-SR2-win32.zip http://jquery.com/ http://www.eclipse.org/downloads/ 4 4 jquery Eclipse 1.7.2 Eclipse IDE for Java EE Developers, 7.0.27 5 tomcat apache-tomcat-7.0.27-windows-x86.zip http://tomcat.apache.org/
Struts2
下载包含了库和代码、例子的全包:struts-2.3.3-all.gz,大约在76m,文件较大,但其中的空应用例程可作为直接拷贝的参考。
Spring
下载包含了库和代码、例子的全包:spring-framework-3.1.1.RELEASE-with-docs.zip
MyBatis
2. 新建WEB工程
选择WEB下Dynamic Web Project类型的工程:
工程命名为EMS,其它选项保持默认。