jsp表单提交问题 没有对应的名为category的Action。或者没有配Action里面的ActionForm吧! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 No bean named '/category' is defined???spring mvc吗?需要配置个controller ,bean name="/category" 是用struts做的还是什么?把struts-config.xml贴出来看看 <bean name="/aaa" class=""> <property name="xxxBo" ref="xxxBo"></property> </bean><action path="/aaa" type=""> <forward name="xxxx" path="/xxxx.jsp"></forward> </action>bean的name要和action的path一样,应该是这样吧 你们说的都那什么,我反复查了好多遍了没发现哪有问题呀struts-config.xml<action path="/category" name="categoryForm" parameter="op" type="org.springframework.web.struts.DelegatingActionProxy"> <forward name="success" path="WebRoot/index.html"></forward> <forward name="error" path="index.jsp"></forward></action>applicatioinContext.xml<bean id="categoryDao" class="com.yscrm.dao.impl.CategoryDaoImpl"> <property name="sessionFactory" ref="sessionFactory"></property></bean><bean id="categoryService" class="com.yscrm.service.impl.CategoryServieImpl"> <property name="categoryDao" ref="categoryDao"></property></bean><bean name="/category" class="com.yscrm.web.action.CategoryAction"> <property name="categoryService" ref="categoryService"></property></bean> 这是我做的配置,看看有帮助吗? <action parameter="o" path="/stack" type="org.springframework.web.struts.DelegatingActionProxy" scope="request" > <forward name="stacks" path="/amline.jsp"></forward> </action>在页面跳转时,你可以这样<input type="hidden" name="o" value="doGetTime"/>下面是Actionpublic ActionForward doGetTime(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // TODO Auto-generated method stub response.setCharacterEncoding("utf-8"); try { request.setCharacterEncoding("utf-8"); } catch (UnsupportedEncodingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } return mapping.findForward("stacks");} 你直接跑action,如何没有报错,就说明其他地方配置错误 新手提问,莫笑! java读取远程文件(任意扩展名) webwork文档 [急]Java调用Oracle存储过程时遇到错误:ORA-06550 变量替带的问题,帮忙 请教:jsp中只显示文本中空格之前的文字 为什么分页显示的时候不能显示第一条记录?? 如何将多行字符串从jsp页面传递给其中的applet 用java mail在jsp中发送邮件,为什么@263的邮件接收不到我发的邮件,而其他好像可以,例如163等 Tomcat和Apache在NT下,性能如果,稳定性呢?急!急!100分 用servlet连接access后创建表时出现奇怪的问题 请教Java
<property name="xxxBo" ref="xxxBo"></property>
</bean>
<action path="/aaa" type="">
<forward name="xxxx" path="/xxxx.jsp"></forward>
</action>bean的name要和action的path一样,应该是这样吧
我反复查了好多遍了
没发现哪有问题呀struts-config.xml
<action path="/category" name="categoryForm" parameter="op"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="success" path="WebRoot/index.html"></forward>
<forward name="error" path="index.jsp"></forward>
</action>applicatioinContext.xml
<bean id="categoryDao" class="com.yscrm.dao.impl.CategoryDaoImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="categoryService" class="com.yscrm.service.impl.CategoryServieImpl">
<property name="categoryDao" ref="categoryDao"></property>
</bean>
<bean name="/category" class="com.yscrm.web.action.CategoryAction">
<property name="categoryService" ref="categoryService"></property>
</bean>
<action
parameter="o"
path="/stack"
type="org.springframework.web.struts.DelegatingActionProxy" scope="request" >
<forward name="stacks" path="/amline.jsp"></forward>
</action>
在页面跳转时,你可以这样<input type="hidden" name="o" value="doGetTime"/>下面是Action
public ActionForward doGetTime(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
response.setCharacterEncoding("utf-8");
try {
request.setCharacterEncoding("utf-8");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
return mapping.findForward("stacks");
}