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


    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 大写了

  • 相关阅读:
    Oracle数据库学习1--简介,基本了解
    数据导出excel表格和Word文档
    Ado.Net 数据库增删改查(联合版)
    Ado.Net 数据库增删改查
    Chapter 10. 设计模式--单例模式
    Chapter 10. 设计模式--工厂模式
    Chapter 9. 线程
    Chapter 8. 进程
    Chapter 7. 对话框控件
    Chapter 6. ListBox控件(双击播放图片)
  • 原文地址:https://www.cnblogs.com/kikyoqiang/p/12309718.html
Copyright © 2020-2023  润新知