`
mmdev
  • 浏览: 12956881 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

struts2 配置action的method属性

 
阅读更多

配置xml 中action的method属性 可以指定调用的方法 而不是调用execute方法


减少action类的数量

分享到:
评论

相关推荐

    Struts2属性文件详解

    Struts2属性文件详解 struts.configuration 该属性指定加载Struts 2配置文件的配置文件管理器.该属性的默认值是org.apache.Struts2.config.DefaultConfiguration, 这是Struts 2默认的配置文件管理器.如果需要实现...

    struts2动态访问调用-method方法

    struts动态访问调用之一,采用method属性,同一个Action内的不同方法来响应用户请求

    Struts2_0500_ActionMethod

    Struts2_0500_ActionMethodStruts2_0500_ActionMethodStruts2_0500_ActionMethod

    struts2配置2.5版

    <action name="login" class="com.mytest.LoginAction" method="execute"> <result> /login.jsp </action> </struts> <!--1.使用 struts2.5.16 版本 2.lib 文件夹下放置:工程所需jar包 3.xml标签...

    struts1和struts2的区别

    另外,按照惯例,在Struts1.x中只有“execute”方法能调用Action, 但在Struts2中并非必要,任何声明为public String methodName() 方法,都能通过配置来调用Action。 最后,和Struts1.x最大的革命性的不同是,...

    Struts课堂笔记.rar--struts2的struts.properties配置文件详解

    struts.action.extension The URL extension to use to determine if the request is meant for a Struts action 用URL扩展名来确定是否这个请求是被用作Struts action,其实也就是设置 action的后缀,例如login....

    Struts2入门教程(全新完整版)

    7.Action中的method属性 12 8.使用ForwardAction实现页面屏蔽。 13 8.使用default-Action配置统一访问 14 小结Action 14 9.使用通配符 14 10.使用0配置:ZERO Annotation 15 11.Result配置详解 15 探讨type类型: 16...

    struts2实例 学生信息管理系统

    struts2实现的学生信息管理系统 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" ...

    Struts2\constant应用

    该属性指定需要Struts 2处理的请求后缀,该属性的默认值是action,即所有匹配*.action的请求都由Struts 2处理。 如果用户需要指定多个请求后缀,则多个后缀之间以英文逗号(,)隔开。 --> <constant name="...

    Struts2最新漏洞升级2.3.32版本

    <constant name="struts.enable.DynamicMethodInvocation" value="true"/> <constant name="struts.convention.action.mapallmatches" value="true"/> 这两行请不要加在外边。<struts>“加在这里”</struts>

    struts2文件上传下载

    struts2文件上传与下载, <s:form name="Myform" action="/fileManage/upload" method="post" enctype="multipart/form-data" theme="simple" > <s:fielderror></s:fielderror> 文件"></s:file> ...

    jfreechar 整合struts2.1.8版本生成线图,饼图,柱形图

    -- include节点是struts2中组件化的方式 可以将每个功能模块独立到一个xml配置文件中 然后用include节点引用 --> <include file="struts-default.xml"> <!-- package提供了将多个Action组织为一个模块的方式 ...

    Struts2的struts.xml配置详细介绍

    配置常量,可以改变Struts 2框架的一些行为 name属性表示常量名称,value属性表示常量值 package元素: 包的作用:简化维护工作,提高重用性 包可以“继承”已定义的包,并可以添加自己包的配置 name属性为必须去且...

    Struts2请求处理方法的处理

    Struts2一个Action内包含多个请求处理方法的处理,method的使用方法,struts2中的路径问题,通配符映射

    struts2Demo

    struts2演示 <br>1./helloworld - helloworld 2./spring - 与spring整合 3./coc - 惯例优先配置,零配置文件 - codebehind不支持redirect,chain等操作,需要自己写jsp跳转 4./crud - CRUD,Create Read...

    用Struts2新建一个应用的方法步骤

    用Struts2新建一个应用的方法步骤用Struts2新建一个应用的方法步骤: 1.首先新建一个Web Project。File——new——Web Project,在Project Name中输入一个合法的名字。例如:struts2 2. 单击采单Window——...

    struts2验证码

    struts2验证码; 配置: <action name="getValidateCode" class="validateCodeAction" method="getValidateCode"> </action> <bean id="validateCodeAction" class="action.ValidateCodeAction"> ...

    struts2.0扫盲文档

    struts2.0扫盲文档2加入struts.xml配置文件(自己建) <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> ...

    第一个struts程序

    1、login.jsp的form表格里的action是在struts.xml中<action name="login" class="check.action.LoginAction">的name的属性的名字后面加上.action 例如:<form action="login.action" method="post"> 2、web.xml中 ...

    struts源码2

    1、讲授 Struts2 的 helloworld 2、讲授 Struts2 Action 的基本配置属性的含义: 1). pakage、namespace、extends 2). action、name、class、method 3)、result、name、type

Global site tag (gtag.js) - Google Analytics