struts.xml里面这么写的:
 <package name="default" namespace="/" extends="struts-default">
        <action name="test" class="dao.TestPrint" method="excute">
            <result name="success">
               /index.jsp
            </result>
        </action>
    </package>
对应的类:
package dao;import com.opensymphony.xwork2.Action;public class TestPrint implements Action{ public String execute() throws Exception {
// TODO Auto-generated method stub
return "success";
}}
它就是不跳转到index.jsp啊,请问为什么?

解决方案 »

  1.   

    配置文件里method="excute"单词写错了,应该是execute嘛
    并且这个可不写的,默认就是执行的execute方法
      

  2.   

    http://localhost:9999/epai_0129_version_001/test
    报错
    Struts has detected an unhandled exception: Messages: dao.TestPrint.excute() 
     
      

  3.   

    配置文件里method中的方法,与你类里的方法,名字不一致
      

  4.   

    <action name="test" class="dao.TestPrint" method="excute">
    class路径写错了把。
      

  5.   


    <action name="test" class="dao.TestPrint" method="excute">
    红色的去掉
      

  6.   

     method="excute"
    LZ新手哦~