报了这个错误:
Request[/insernews] does not contain handler parameter named 'command'.  This may be caused by whitespace in the label text.
我的配置文件struts-config里是这样的
 <action path="/insernews" type="org.springframework.web.struts.DelegatingActionProxy" 
   name="insertnewform" parameter="command">
    <forward name="bbs" path="/backoffice/user/zidian/bbs.jsp"></forward>
    </action>
而且,我也继承了DispatchAction这个类,为什么会这样
在文件里明明有这个command为什么说不包含啊!请各位虾米帮帮忙了!!在线等待,急…………

解决方案 »

  1.   


     http:\\localhost:8080\Test\Test.do?command="值"
    你Test.do后少个?command="值"
    request.getParameter("command")取不出来值
      

  2.   

    楼主这样的错误最好把代码贴出来  让我们分析下  你这样的错误我们只能猜,你最好网上搜索下,是不是提交请求方式的问题,还是scope没指定。
      

  3.   

    document.myform.action="<%=basePath%>insernews.do?command=insertnews";
    document.myform.submit();配置文件里面的
    <action path="/insernews" type="org.springframework.web.struts.DelegatingActionProxy" 
         name="insertnewform" parameter="command" scope="request">
        <forward name="bbs" path="/backoffice/user/zidian/bbs.jsp"></forward>
        </action>
    对应的方法
    public ActionForward insertnews(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
         InsernewsForm newsform=(InsernewsForm)form;
         news.setTitle(newsform.getTitle());
         news.setComment(newsform.getComment());
         news.setBigdate(newsform.getBigdate());
         news.setPri(newsform.getPRI());
         news.setReleaseUtity(newsform.getReleaseUtity());
         news.setRoles(newsform.getRole());
         news.setSmalldate(newsform.getSmalldate());
         newsdao.InsertNews(news);
         List<News> list=newsdao.querynews();
         request.setAttribute("newslist", list);
    return mapping.findForward("bbs");

    }继承的也是DispatchAction
      

  4.   

    <html:form>和普通的<form>是有区别的,在用form提交表单的时候别忘记要家范围method="post",不然也会有错