SSH集成后,提交表单,找不到action? struts-config.xml中有没有加入spring的插件 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你spring的配置文件中有没有这个myUserBiz bean以及这个bean 中biz属性 将spring的配置文件作为插件加载 加了啊: <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="classpath*:/WEB-INF/classes/applicationContext-*.xml" /> </plug-in> <bean id="myUserDao" class="com.dao.impl.MyUserDaoImpl"> <property name="sessionFactory" ref="sessionFactory"></property> </bean> <bean id="myUserBiz" class="com.biz.impl.MyUserBizImpl"> <property name="dao" ref="myUserDao"></property> </bean> <bean name="/myUser" class="com.web.action.MyUserAction"> <property name="biz" ref="myUserBiz"></property> </bean> <bean name="/myUser" class="com.web.action.MyUserAction">红色部分可以这样用吗...会不会是这里有问题啊.... :<form action="myUser.do?op=login" method="post" name="mf"> path="/myUser"兄弟 你提交表单的时候 应根据action的path路径来的 正确的代码::<form action="myUser" method="post" name="mf">因为需传参数过去那边 所以你可以在<form></form>节点内 添加一个隐藏表单域:<html:hidden property="op" value="login" /> <form action="myUser.do?op=login" method="post" name="mf">action路劲与struts.xml配置文件中action的路径一致即<action parameter="op" path="/myUser" type="org.springframework.web.struts.DelegatingActionProxy"> <forward name="fa" path="/index.jsp" /> <forward name="su" path="/list.jsp" /> </action>中的path相同 估计是路径的问题好像,配置中是/myUser,但请求的时候会不会是在/pages/**.jsp中进行的请求啊,那这个路径就该是/pages/myUser了吧。考虑下了 你的 Spring 配置中写访问节点了吗 有可能是那里的错误 如果都没有配错 就应该是编译不通过的问题了 编译器没有把你写的东西编译到服务器 首先你要保证所有需要的包都加载了struts.xmlpath="/myUser" type="org.springframework.web.struts.DelegatingActionProxy">spring文件:<bean name="/myUser" class="com.web.action.MyUserAction">页面<form action="myUser.do?op=login" method="post" name="mf">怎么这些看起来有点不对劲啊。 哪位大侠帮忙啊! sql转换为hql问题 好多问题(初学者) 初学,关于servlet配置 请问学java入门看哪本书?请给推荐一下 查询返回的是Vector类型的,但是我要的是表中的一个字段-String类型的---解释一下啊--- 散分啊.. Jsp 文件的后缀为什么多了.htm 如果用程序控制分页问题! 页面刷新问题? 请教页面超时的问题 org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/ta 怎样修改hibernate的库
以及这个bean 中biz属性
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="classpath*:/WEB-INF/classes/applicationContext-*.xml" />
</plug-in>
<bean id="myUserDao" class="com.dao.impl.MyUserDaoImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="myUserBiz" class="com.biz.impl.MyUserBizImpl">
<property name="dao" ref="myUserDao"></property>
</bean>
<bean name="/myUser" class="com.web.action.MyUserAction">
<property name="biz" ref="myUserBiz"></property>
</bean>
红色部分可以这样用吗...
会不会是这里有问题啊....
path="/myUser"
兄弟 你提交表单的时候 应根据action的path路径来的
正确的代码::<form action="myUser" method="post" name="mf">
因为需传参数过去那边 所以你可以在<form></form>节点内 添加一个隐藏表单域:
<html:hidden property="op" value="login" />
parameter="op"
path="/myUser"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="fa" path="/index.jsp" />
<forward name="su" path="/list.jsp" />
</action>
中的path相同
但请求的时候会不会是在/pages/**.jsp中进行的请求啊,
那这个路径就该是/pages/myUser了吧。
考虑下了
path="/myUser"
type="org.springframework.web.struts.DelegatingActionProxy">spring文件:
<bean name="/myUser" class="com.web.action.MyUserAction">页面
<form action="myUser.do?op=login" method="post" name="mf">怎么这些看起来有点不对劲啊。