当前位置: 代码迷 >> J2EE >> 初学Struts,Action不响应的有关问题
  详细解决方案

初学Struts,Action不响应的有关问题

热度:31   发布时间:2016-04-22 02:20:50.0
初学Struts,Action不响应的问题
做了一个简单的表单提交,但是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>
  相关解决方案