做了一个简单的表单提交,但是action不响应,出来就是一个空白页面。不知道什么原因啊。
struts-config.xml如下
- XML code
<struts-config> <data-sources /> <form-beans > <form-bean name="formBean1" type="com.turk.struts.form.UserForm" /> </form-beans> <global-exceptions /> <global-forwards > <forward name="failed" path="/error.jsp"/> <forward name="successed" path="/right.jsp"/> </global-forwards> <action-mappings > <action path="/login" type="com.turk.struts.action.LoginAction" name="formBean1" scope="request" input="/login.jsp"/> <action path="/regist" forward="/regist.jsp"/> </action-mappings></struts-config>
------解决方案--------------------
你的Struts是哪个版本的?
只需要配置Struts.xml就可以了
你的配置怎么这么复杂?
------解决方案--------------------
这个应该是Struts 1.X 版本的把,lz可以考虑换2.X版本的来 ,比这简单多了
------解决方案--------------------
struts1.X没用过,建议直接学2
出现空白页面,而且没有出现报错,404,500等,应该是你还没配置web.xml吧?
没有struts的支持
------解决方案--------------------
楼主的是struts1 爱莫能助 只会struts2
------解决方案--------------------
<action path="/login">这个里面你的跳转页面的配置呢?
------解决方案--------------------
比如登陆,
<action path="/login" type="com.turk.struts.action.LoginAction" name="formBean1" scope="request" input="/login.jsp">
<forward name="success" path="/login.jsp"/>
<forward name="failure" path="/login.jsp"/>
</action>