1 struts2介绍.ppt

Action方法的动态调用 一个action有多个业务方法 Struts可以灵活调用 ActionName!方法名.action 在配置文件中指明调用的方法 action name=“” class=“” converter=“” method=“” result name=“”/*.jsp/result /action 在配置文件中使用* action name=“*Action” class=“” converter=“” method=“{1}” result name=“”/*.jsp/result /action 局部Result result name=“” type=“” /result Ation返回值为String实现解耦 默认返回类型为dispacher(在struts-default.xml中可以查看) action name=“” class=“” result name=“”/*.jsp/result /action 全局结果 当多个action中都使用到了相同result,这时我们应该把result定义为全局结果。struts1中提供了全局forward,struts2中也提供了相似功能: package global-results result name=message/message.

文档评论(0)

1亿VIP精品文档

相关文档