1.<!DOCTYPE>的配置和作用
a.代码提示
b.提示错误
c.配置如下:"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd"
2.<constant name="struts.objectFactoey" value="spring"></constant>
==>意思是struts2的action由spirng负责实例化
3.全局配置,跳转错误提示或登录页面
<!-- 全局配置--><global-results>
<result name="msg">/WEB-INF/jsp/msg.jsp</result>
<result name="login" >/WEB-INF/jsp/login.jsp</result>
</global-results>
4.一般的action配置,通常是按照模块一步一步开发,例如user,product的
<action name="product_*" class="productAction" method="{1}">
<result name="findByPid">/WEB-INF/jsp/product.jsp</result>
<result name="findByCid">/WEB-INF/jsp/productList.jsp</result>
<result name="findByCsid">/WEB-INF/jsp/productList.jsp</result>
</action>
最后
以上就是舒适香菇最近收集整理的关于SSH整合中Struts.xml的配置的全部内容,更多相关SSH整合中Struts.xml内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复