package tutorial;import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;public class LoginAction extends ActionSupport{

private String username;
private String password;

public String getUsername(){
return username;
}

public void setUsername(String username){
this.username = username;
}

public String getPassword(){
return password;
}

public void setPassword(String password){
this.password = password;
}

public String execute() throws Exception{
if( getUsername().equals("admin") && getPassword().equals("admin")){
ActionContext.getContext().getSession().put("user", getUsername());
return "success";
}else{
return "error";
}
}
}
这个类死活不能在jdk1.6下编译, 我只好用Eclipse去编译它, 据说是jdk5以后的一个泛型的问题, 那应该如何去修改呢, 请大家帮帮忙.