日期:2014-05-17 浏览次数:21017 次
<s:form name="targetForm" action="login">
<s:textfield name="username" label="用户名"></s:textfield>
<s:password name="password" label="密 码"></s:password>
<s:radio label="用户类型" name ="type" list= "{'学生','管理员'}"/>
<s:submit value="登陆" />
</s:form>
<s:radio label="用户类型" name ="type" list= "{'学生','管理员','游客'}"/>
public class LoginAction extends BaseAction
{
private String type;
……………………
//省略无关变量的setter
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}