03. struts2中Action配置的各项默认值

Action中的各项默认值

  • Action各项配置

    •  <action name="helloworld" class="com.liuyong666.action.HelloWorldAction" method="execute" >
           <result name="success">/WEB-INF/page/hello.jsp</result>
       </action>       
  • Action默认配置

    •  <action name="helloworld">
           <result>/WEB-INF/page/hello.jsp</result>
       </action>
  • 默认值

    1. 如果没有为action指定class,默认是ActionSupport。
    2. 如果没有为action指定method,默认执行action中的execute() 方法。
    3. 如果没有指定result的name属性,默认值为success。

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-25 17:55
点赞 评论 收藏
分享
求offer的大角牛:简历写的第一乱,没有突出重点,第二项目太多太杂看不出来有啥核心技术,第三自我评价太多了,第四获得的荣誉没啥含金量,可以不写,反正问题不少
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
今天 11:34
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务