struts2与Spring集成步骤_struts2框架技术入门

其他范文 时间:2020-02-28 04:51:22 收藏本文下载本文
【www.daodoc.com - 其他范文】

struts2与Spring集成步骤由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“struts2框架技术入门”。

1、创建web project SS22、导入spring框架,core包、webLibraries包

3、导入struts2框架,core包导入还需要导入struts2-spring-plugin包

注意:可以通过右键选择configure build path,选择Add LibraryMyEclipse libraries,添加所需要的包

4、编写action---cn.edu.njupt.actions.UserAction5、配置struts.xml

succe.jsp

6、配置web.xml

contextConfigLocation

clapath:applicationContext.xml

org.springframework.web.context.ContextLoaderListener

struts2

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

struts2

/*

注意:a、指明applicationContext.xml的位置 b、编写spring的Listener c、struts2的配置信息保持不变

7、配置applicationContext.xml 注意:id需要和Struts.xml中对应Action配置节点中的cla属性(此时的cla属性与action类名无关)保持一致,scope设置为prototype

下载struts2与Spring集成步骤word格式文档
下载struts2与Spring集成步骤.doc
将本文档下载到自己电脑,方便修改和收藏。
点此处下载文档

文档为doc格式

    热门文章
      整站推荐
        点击下载本文