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 大写了
原文地址:https://www.cnblogs.com/kikyoqiang/p/12309718.html
时间: 2024-10-15 09:29:26