您的位置:首页 > 其它

struct2 tags - Getting Started

2014-03-20 10:00 197 查看
Getting Started

1. VIEW

要引入taglib

<%@ taglib prefix="s" uri="/struts-tags" %>

然后加入以下内容

<body>

<s:property value="status" /> <br>

</body>

这表示在此显示Action中的一个叫status的变量的值

2. Action

public class TestAction extends ActionSupport

{

Integer status;

public String execute()

{

status = 1;

return SUCCESS;

}

public Integer getStatus()

{

return status;

}

public void setStatus(Integer status)

{

this.status = status;

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: