首页 > Web开发 > 详细

【struts 报错】 No action config found for the specified url

时间:2020-02-14 22:37:03      阅读:81      评论:0      收藏:0      [点我收藏+]

1

type Exception report

message org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.
    org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    k.filter.EncodingFilter.doFilter(EncodingFilter.java:14)
root cause

org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.
    org.apache.struts.chain.commands.AbstractSelectAction.execute(AbstractSelectAction.java:71)
    org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
    org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
    org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    k.filter.EncodingFilter.doFilter(EncodingFilter.java:14)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.35 logs.

原因:

struts-config.xml里面的 path 是 区 分 大 小 写 !!!

过程

    <action name="userForm" path="/login" parameter="action" type="k.action.LoginAction"
            scope="request" attribute="userForm" input="index.jsp" validate="false">
        <forward name="ok" path="/WEB-INF/jsp/ok.jsp"></forward>
        <forward name="err" path="/WEB-INF/jsp/err.jsp"></forward>
        <forward name="login" path="/WEB-INF/jsp/login.jsp"></forward>
    </action>
<form action="${APP_PATH}/Login.do?action=doUserLogin" method="post">
    账号:<input type="text" name="userName" value="11哈哈"> <br>
    密码: <input type="password" name="password" value="1"> <br>
    <input type="submit" value="submit"> <br>
</form>


form的path Login 大写了

【struts 报错】 No action config found for the specified url

原文:https://www.cnblogs.com/kikyoqiang/p/12309718.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!