1、错误描写叙述

2014-7-13 2:38:54 org.apache.jasper.compiler.TldLocationsCache tldScanJar
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2014-7-13 2:38:55 org.apache.struts2.dispatcher.Dispatcher warn
警告: Could not find action or result: /FirstSSH/pages/action/student/findStudent.action
There is no Action mapped for namespace [/pages/action/student] and action name [findStudent] associated with context path [/FirstSSH]. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

2、错误原因

      无法找到Action路径,页面引入Action的路径有问题



3、解决的方法

     在页面引入一个路径jsp

<%@ include file="pathTags.jsp"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib prefix="m" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <c:set var="bp" value="<%=basePath%>"></c:set>
<c:set var="pa" value="<%=path%>"></c:set>

action请求时

$(function(){
$.ajax({
type:"post",
url:"${bp}/action/student/findStudent.action",
dataType:"json",
success:function(data){ }
});
});

路径前加上“${bp}”



There is no Action mapped for namespace [/pages/action/student] and action name [findStudent]的更多相关文章

  1. 报错:HTTP Status 404 - There is no Action mapped for namespace [/] and action name [product-save] associated with context path [/20161101-struts2-2].

    运行:index.jsp---->input.jsp----->details.jsp,但是在input.jsp到details.jsp的时候报错误. 异常如下: 严重: Could no ...

  2. struts2中错误There is no Action mapped for namespace [/] and action name [] associated with context path

    1 There is no Action mapped for namespace [/] and action name [] associated with context path [/Stru ...

  3. struts2报错:There is no Action mapped for namespace [/] and action name [userAction!add]

    使用struts2.3进行动态方法调用时出现: There is no Action mapped for namespace [/user] and action name [user!add] a ...

  4. Struts2中关于"There is no Action mapped for namespace / and action name"的总结

    今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误. ...

  5. Struts2-tomcat报错:There is no Action mapped for namespace / and action

    HTTP Status 404 - There is no Action mapped for namespace / and action name first. type Status repor ...

  6. Struts2中DMI(动态方法调用)的错误问题(There is no Action mapped for namespace [/xxx] and action name [xxx!yyy] a)

    默认的Struts.xml中是这样的 <constant name="struts.enable.DynamicMethodInvocation" value="f ...

  7. There is no Action mapped for namespace / and action name UserAction

    果断收藏了,说的非常具体.刚開始学习的人常常遇到的问题. There is no Action mapped for namespace / and action name UserAction 在网 ...

  8. eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name [Login] associated wi

    下午在eclipse中配置struts2时报: There is no Action mapped for namespace [/] and action name [Login] associat ...

  9. eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误

    eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with conte ...

随机推荐

  1. zoj 3351 Bloodsucker(概率 dp)

    题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4530 dp[i]表示现在存在i个吸血鬼要达成目标(全为吸血鬼)天数的数学 ...

  2. Spark(1) - Getting Started with Apache Spark

    Introduction Apache Spark is a general-purpose cluster computing system to process big data workload ...

  3. POJ 2455 Secret Milking Machine (二分+无向图最大流)

    [题意]n个点的一个无向图,在保证存在T条从1到n的不重复路径(任意一条边都不能重复)的前提下,要使得这t条路上经过的最长路径最短. 之所以把"经过的最长路径最短"划个重点是因为前 ...

  4. Java [leetcode 28]Implement strStr()

    题目描述: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if ...

  5. 【转】armeabi和armeabi-v7a

    原文网址:http://blog.csdn.net/dxpqxb/article/details/7721156 在我们android APK的根目录有一个 libs文件夹,此文件夹下包含了armea ...

  6. jQuery 属性操作 - val() 方法

    val() 方法返回或设置被选元素的值. 元素的值是通过 value 属性设置的.该方法大多用于 input 元素. 如果该方法未设置参数,则返回被选元素的当前值. <html> < ...

  7. Using AngularJS with .NET MVC 5

    This tip shows the use of AngularJS with .NET MVC5 application. Here is a simple step-by-step exampl ...

  8. 向Oracle数据库中插入数据出错:ORA-01036 无效的变量名或数据

    向Oracle数据库中插入数据出错: 经过排查,因为Update数据时没有出错,所以OracleHelper没有问题: 看异常信息提示:无效的变量和数据,应该是SQL语句的问题,调试时所传的实例Use ...

  9. (Android Studio)添加按钮以及权重问题

    此文大部分摘自http://hukai.me/android-training-course-in-chinese/basics/firstapp/building-ui.html 注意到光标所在代码 ...

  10. Java Web程序工作原理

    Web开发的最重要的基本功能是HTTP:Java Web开发的最重要的基本功是Servlet Specification.HTTP和Servlet Specitication对于Web Server和 ...