你的位置:首页 > 软件开发 > Java > Struts2(六)result

Struts2(六)result

发布时间:2015-03-29 16:00:21
一、result简述result:输出结果;第个Action返回一个字符串,Struts2根据这个值来决定响应结果name属性:result的逻辑名。和Actin里的返回值匹配,默认"success"值 :指定对应的实际资源位置二、Action中返回其它值 ...

Struts2(六)result

一、result简述

result:输出结果;第个Action返回一个字符串,Struts2根据这个值来决定响应结果

name属性:result的逻辑名。和Actin里的返回值匹配,默认"success"

值 :指定对应的实际资源位置

二、Action中返回其它值

 如果Action中返回其它扯,result中的Name属性要与之对应才可以找到指定的资源

 Action默认定义了一些常量,可以拿来使用

package com.opensymphony.xwork2;public interface Action {    public static final String SUCCESS = "success";  public static final String NONE = "none";   public static final String ERROR = "error";   public static final String INPUT = "input";  public static final String LOGIN = "login";}

原标题:Struts2(六)result

关键词:Struts

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录