运行tomcat 提示如下错误: The requested resource () is not available的解决方案

出现这个问题,接口肯定是没问题了。问题可能有两个:

1、文件设置无法访问;

2、缺少架包;

解决办法:1、只需要修改Tomcat服务器中web.xml

<init-param>
 
<param-name>listings</param-name>

<param-value>false(将其该为true)</param-value>

</init-param>

但改为true之后,还是出现同样的错误,所以,接着寻找答案。

2、有一个jar的文件没有导入到项目中。

因此,必须将Struts 2的jar包复制到项目的WEB-INF/lib目录下,开发Struts
2框架至少需要的jar文件如下:
commons-fileupload-1.2.1.jar 
commons-io-1.3.2.jar

commons-logging-1.0.4.jar
freemarker-2.3.13.jar

ognl-2.6.11.jar 
struts2-core-2.1.6.jar 
xwork-2.2.1.jar

当然,如果开发不同的项目需要的jar文件是不同的!

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis

最近在做spring+struts2+IbatIS的项目,昨天eclipse启动服务器正常,结果今天来了就总是报错,错误如下:

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)

at org.apache.catalina.core.StandardService.start(StandardService.java:450)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)

at org.apache.catalina.startup.Catalina.start(Catalina.java:551)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

网上查,好多人说是没有spring的相关包,但是我有些不赞成,因为我的昨天还能启动的,所以应该不是这个问题

最后我发现可能是tomcat的缓存问题,解决方法为:

把eclipse里面的servers全部删除,然后把工程clean一下,之后重新建一个server运行。这样问题的就解决了。

The requested resource is not available...的更多相关文章

  1. asp.net mvc 5 web api 关于Requested resource does not support options 问题

    1.用visual studio 2015 建立一个 web api 应用程序.记住这是一个 web api 应用. 2.新建一个web api . 3.用C#访问,代码如下:[没有问题,返回正确] ...

  2. js跨域访问,No 'Access-Control-Allow-Origin' header is present on the requested resource

    js跨域访问提示错误:XMLHttpRequest cannot load http://...... No 'Access-Control-Allow-Origin' header is prese ...

  3. Servlet中The requested resource is not available错误

    自己为了测试servlet,用MyEclipse2015写了一个简单的登录程序. 1.登录页面index.jsp. <%@ page language="java" impo ...

  4. No 'Access-Control-Allow-Origin' header is present on the requested resource.

    今天做一个AJAX案例时,浏览器监控到如下错误: XMLHttpRequest cannot load http://54.169.69.60:8081/process_message. No 'Ac ...

  5. ajax请求node.js接口时出现 No 'Access-Control-Allow-Origin' header is present on the requested resource错误

    ajax请求node.js接口出现了如下的错误: XMLHttpRequest cannot load http://xxx.xxx.xx.xx:8888/getTem?cityId=110105&a ...

  6. As.net WebAPI CORS, 开启跨源访问,解决错误No 'Access-Control-Allow-Origin' header is present on the requested resource

    默认情况下ajax请求是有同源策略,限制了不同域请求的响应. 例子:http://localhost:23160/HtmlPage.html 请求不同源API http://localhost:228 ...

  7. jsp The requested resource (/demo10/loginBean) is not available.

    The requested resource (/demo10/loginBean) is not available. <?xml version="1.0" encodi ...

  8. 【转】tomcat 访问软连接文件夹下的网页出现404错误,description The requested resource (/xxx.html) is not available.

    在 tomcat/webapps/ROOT/ 下建立一个软连接文件ln -s /home/ubuntu/report report   再到report软连接目录里建立个 report.html通过浏 ...

  9. (转)AJax跨域:No 'Access-Control-Allow-Origin' header is present on the requested resource

    在本地用ajax跨域访问请求时报错: No 'Access-Control-Allow-Origin' header is present on the requested resource. Ori ...

随机推荐

  1. eclipse添加easyExport插件,打开本地文件

    下载地址:https://github.com/samsonw/OpenExplorer/downloads 官方:http://sourceforge.net/projects/easystruts ...

  2. MATLAB地图工具箱学习总结(一)从地图投影说起

    MATLAB地图工具箱学习总结(一)从地图投影说起 前言 本学期地图投影课上,李连营老师建议我们使用MATLAB完成每周的作业.从大二上学期开始接触MATLAB学习数学运算和地理数据处理的我,自然不会 ...

  3. 关于 OJ1575的参考题解

    #include <stdio.h>int main(){ int a,b; scanf("%d",&a); b=0; while(a) { b+=a%10; ...

  4. iOS_一个购物车的使用

    这个项目是本人原创:要转载,请说明下:http://www.cnblogs.com/blogwithstudyofwyn/p/5618107.html 项目的地址:https://github.com ...

  5. JavaScript、jQuery、fish的遍历方法(each、forEach)总结

    起因 在工作中,需要在遍历的dom中找到第一个并做下操作然后退出遍历,我首先想到了用each方法,但由于无论是公用的jQuery组件还是公司的fish组件.我都忘记了怎么去退出遍历,所以就有了这篇帖子 ...

  6. Signatures of Mutational Processes in Human Cancer

    http://cancer.sanger.ac.uk/cosmic/signatures#

  7. Redis学习-基础环境介绍(二)

    1.通过VMware安装了Centos6.8系统 2.Reids安装过程,需要GCC环境 »通过下面命令,根据提示直接安装 1 yum install gcc 3.Redis选用的是3.2.4(建议使 ...

  8. Linux时间设置及同步

    Linux系统安装时选择的UTC时间是国际标准时间,而中国处于UTC+8时区,因此安装系统时不要选择UTC时区. 还有就是Linux有两个时钟: 1.Bios时钟及硬件时间 2.Kernel时钟及系统 ...

  9. Sublime Text 配置记录

    sublime userSetting sublime theme sublime plug sublime userSetting 对sublime的配置 { "color_scheme& ...

  10. raw转qcow2

    raw转qcow2命令 : qemu-img convert -f raw test.img -O qcow2 test.img.qcow2 转晚之后,还需要virsh edit test,修改里面的 ...