注册 登录
编程论坛 J2EE论坛

Struts 标签错误

huangnetian 发布于 2007-10-09 20:17, 712 次点击
<bean:write name="invest" property="id"/>
出现错误
Cannot find message resources under key org.apache.struts.action.MESSAGE

<bean:write name="invest" property="phasename"/>
正常

我都快烦死了,请大家帮帮忙

public class TinvestPlan {
private int id;
private String phasename;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getPhasename() {
return phasename;
}
public void setPhasename(String phasename) {
this.phasename = phasename;
}
}
3 回复
#2
suncf19852007-10-12 11:13
Cannot find message resources under key org.apache.struts.action.MESSAGE

这个类没有找到!包引入了吗?
#3
风月_无边2007-10-12 14:39
是不是沒有寫getId()這個方法﹖
#4
hopemosue2007-10-22 19:37
我感觉是你的类型不通用,你的<bean:write name="invest" property="phasename"/>
能正常运行,说明你id设成int,中间过度转换下试试
1