如何获取URL中的Param?
e: url: 127.0.0.1:8080/index.html?name=xiao
public class Register implements Action {
public String execute () throws Exception
{
ActionContext ctx = ActionContext.getContext();
try{
Map<String, Object> map = ctx.getParameters();
String name = ((String [])map.get("name"))[0];
print (" name :" + name)
}catch(Exception e){
return ERROR;
}
}
}