package action;
import com.opensymphony.xwork2.Action;
public class HelloWorldAction implements Action{
//请求中传递的参数和返回给页面的值都定义成属性
private String username
private String password
//getter/setter方法
@Override
public String execute() throws Exception{
//查看请求中传递的参数
System.out.print1n(username);
//改变这个message,会自动传递给页面
message="hello:"+username;
//SUCCESS是Action中的常量,值是success
return SUCCESS;
}}
标签:username,String,private,123213,Action,message
From: https://www.cnblogs.com/Met32/p/16603345.html