当前位置: 代码迷 >> Java Web开发 >> strcts2 跳转有关问题
  详细解决方案

strcts2 跳转有关问题

热度:174   发布时间:2016-04-17 00:52:49.0
strcts2 跳转问题
structS.XML
XML code
<package name="com.gogoosoft" namespace="/" extends="core-default">    <action name="login" class="com.gogoosoft.action.LoginAction" method="post">    <result type="dispather">/one.jsp</result>    </action></package>    


index.JSP
Java code
 <form action="login" method="post">    <input type="text" name="userName">    <input type="text" name="userPassword"/>    <input type="submit"/>    </form>


出错:HTTP Status 404 - No result defined for action com.gogoosoft.action.LoginAction and result success

--------------------------------------------

type Status report

message No result defined for action com.gogoosoft.action.LoginAction and result success

description The requested resource (No result defined for action com.gogoosoft.action.LoginAction and result success) is not available.


------解决方案--------------------
探讨

引用:
引用:

引用:
result的name没有写,默认就是success
method=post,那么就是走的post方法,把你action中的post方法贴出来看看吧


Java code

public String execute() throws ……
  相关解决方案