Struts2 学习笔记一
最近要用到Struts2 先研究一下 strtus2
?
1.先下载一个 Struts2
??????? http://struts.apache.org?下载一个?? Struts2
2. 新建一个web项目
???
??? 加入如下包 commons-fileupload-1.2.1.jar, freemarker-2.3.15.jar, ognl-? 2.7.3.jar, struts2-core-2.1.8.1.jar,?? xwork-core-2.1.6.jar 包
?
3. 配置 web.xml
?
?
?
?据说 以前的 filter 是
org.apache.struts2.dispatcher.FilterDispatcher
现在版本都改成:
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
?
4.写个页面
?
?
?
5. 写个action
?
?
好了运行一下。结果ok
?
?
?
?
???