头疼!!关于 Exception creating bean of class : {1}的问题

cat_Honey 2008-08-08 12:15:30
具体代码是这样的 帮忙看下,多谢
jsp部分

<html:form action="/login">
<tr align="center">用户登陆</tr>
<tr>
<td>用户名<br><br></td>
<td><html:text property="loginName"/><br><br><br></td>
</tr>
<tr>
<td>密码<br><br></td>
<td><html:password property="password"/><br><br><br></td>
</tr>
<tr>
<td><html:submit>提交</html:submit><br><br></td>
<td><html:button property="register" value="注册新用户"></html:button></td>
</tr>
</html:form><br><br></tr>

form部分
public class LoginForm extends ActionForm{
private String userName;
private String password;
public ActionErrors validate(
ActionMapping mapping,HttpServletRequest request){
ActionErrors errors=new ActionErrors();
if((userName==null||userName.length()<1)){
errors.add("noLoginName",new ActionError("用户名不能为空"));
}
if((password==null||password.length()<6)){
errors.add("noPassword",new ActionError("密码长度必须大于6位"));
}
return errors;
}
public void reset(ActionMapping mapping,HttpServletRequest request){
this.userName=null;
this.password=null;
}
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;
}


}

struts-config部分
<struts-config>
<data-sources />
<form-beans >
<form-bean name="loginForm" type="com.bedding.struts.form.LoginFrom"/>
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<action attribute="loginForm" input="/login.jsp" name="loginForm"
path="/login" scope="session" type="com.bedding.struts.action.LoginAction">
<forward name="success" path="/letgo.jsp" />
</action>
</action-mappings>
<message-resources parameter="com.bedding.struts.ApplicationResources" />
</struts-config>


...全文
256 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

24,917

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧