0
我又具有条纹的一些小问题,这一次的链接标签 基本上我从一个jsp调用一个动作豆像这样:条纹不看我的ActionBean
<s:link beanclass="users.action.UserFormActionBean">...</s:link>
的例外,我收到是:
The value supplied for the 'beanclass' attribute does not represent a valid ActionBean.
因为那类实现的ActionBean(通过称为BaseActionBean类助手),它包含一个@DefaultHandler这是不正确的。
我真的无法弄清楚,为什么它不工作,下面我将发布两个班
public class UserFormActionBean extends BaseActionBean{
private User user;
private static final String FORM="/WEB-INF/jsp/form.jsp";
private static final String LIST="/WEB-INF/jsp/list.jsp";
@DefaultHandler
public Resolution goToForm(){
return new ForwardResolution(FORM);
}
/**
* A getter for the user
* @return
*/
public User getUser(){
return this.user;
}
/**
*save the new user into db
*/
public Resolution save(User user){
DaoUtil.save(user);
return new ForwardResolution(LIST);
}
}
助手:
public class BaseActionBean implements ActionBean{
private ActionBeanContext ctx;
public void setContext(ActionBeanContext ctx){
this.ctx=ctx;
}
public ActionBeanContext getContext(){
return this.ctx;
}
}
这是解决抱歉,我有类路径中的问题! – JBoy 2011-03-09 06:27:20