struts2中的method

简介:
现对struts2中的method进行总结:
1、当不使用通配符和DMI时,method代表当前action中的方法名
2、当使用DMI时,当前action中是不使用method的
3、当使用通配符配置时,method代表当前action中,name中*号的序号,即method为几,就代表是第几个*号;在这时,result中的数字与method意思相同。


本文转自sucre03 51CTO博客,原文链接:http://blog.51cto.com/sucre/359954,如需转载请自行联系原作者
相关文章
|
Java Spring
springmvc:405 request method post not supported
springmvc:405 request method post not supported
133 0
|
前端开发 Java Spring
Spring MVC报错: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'XXXController' method
Spring MVC报错: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'XXXController' method
194 0
Spring MVC报错: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'XXXController' method
|
前端开发 Java 调度
|
前端开发
struts2 中的 addActionError 、addFieldError、addActionMessage的方法
addActionError 、addFieldError、addActionMessage都是ActionSupport的方法   一、addActionError("错误内容"):Action级别的错误消息this.
1092 0
The annotation @ResponseBody is disallowed for this location
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545} The annotation @ResponseBody is disallowed for this location p.
2377 0
|
Java
Struts中ModelDriven的使用
它是Struts2种独有的一种接收用户输入的机制,想在项目中使用模型驱动 (ModelDriven)需要让Action实现com.opensymphony.xwork2.ModelDriven 接口,使用它 的getModel()方法来通知Struts2要注入的属性类型,并且声明属性时一定要实例化,但不需get, set方法。  package com.lsc.alan.action;    
1579 0