你要写一个unspecified方法,如下,你应该可以看明白
    public ActionForward unspecified(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
return list(mapping, form, request, response);
}

解决方案 »

  1.   

    public ActionForward list(ActionMapping map。。 public ActionForward execute(ActionMapping map。。 -------------------------------------------------------------------------------- if(action==null ¦ ¦action.equals("null")) 

    ActionMessages errors = new ActionMessages() ; 
    errors.add("errorKK",new ActionMessage("kK_Select.null")) ; 
    super.saveErrors(request, errors) ; 
    return mapping.getInputForward() ; 
    }
      

  2.   

    这个问题我也遇到过,而且如果action值在UserAction 里没有一个方法与之对应也会在页面出异常。
    那么向2楼的同志那么写,也是不正确的。
    我是在formbean中进行验证的,部分代码如下:期待更好的方法!
    // 判断action中有没有此方法存在
    String method = request.getParameter("method");if ("create".equals(method) || "update".equals(method)) {
    // 增加,更新文章的验证
    return this.validate_0(mapping, request);} else if ("read".equals(method) || "edit".equals(method) || "delete".equals(method)) {
    // 对一篇文章的查看,修改,删除的验证
    return this.validate_1(mapping, request);} else {
    // action中没有一个方法与之对应
    return this.validate_4(mapping, request);
    }