Could not find action or result

来源:互联网 发布:python http上传文件 编辑:程序博客网 时间:2024/06/08 13:46

写了一个简单的struts2 登入例子,结果报错:

WARN - Could not find action or result

No result defined for action com.kingfish.actions.LoginAction and result success

原因:

在loginaction.java类中返回的是success和failure;在struts.xml 中是大写的:

 <action name="login" class="login.LoginAction">

            <result name="SUCCESS">/success.jsp</result>

            <result name="FAILURE">/failure.jsp</result>

        </action>

二边改为一致即可!

0 0
原创粉丝点击