搭建开发环境
在公司开发时都是使用已经搭建好的框架进行开发。通过从头搭建环境,熟悉搭建过程,以此记录。
先使用struts2.1.8版本,spring、hibernate之类的之后再集成进来。
过程:
1.新建空的Web工程,能正常运行。
2.add the minimal required Struts 2 framework Jar files。
4.加入Struts 2 Servlet Filter。从struts2.1.3开始,废弃原来使用的FilterDispatcher,而使用StrutsPrepareAndExecuteFilter。也可以使用StrutsPrepareFilter和StrutsExecuteFilter如果你需要使用ActionContextCleanUp(deprecated,Since Struts 2.1.3, use StrutsPrepareFilter and StrutsExecuteFilter to use other Servlet filters that need access to the ActionContext)。