报了这个错误:
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为什么说不包含啊!请各位虾米帮帮忙了!!在线等待,急…………
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为什么说不包含啊!请各位虾米帮帮忙了!!在线等待,急…………
http:\\localhost:8080\Test\Test.do?command="值"
你Test.do后少个?command="值"
request.getParameter("command")取不出来值
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