做网页过程中,某页需要以新窗方式打开另一个网页,于是url是这样写:

pages/test/transw/claimer.html

但是,点链接后网页提示

The requested resource () is not available.

再检查一遍url,没有发现拼写错误。

郁闷一阵,看看后缀,明白了,claimer.html的后缀是html,这和Web.xml中设置的url-pattern对应上了:

    <servlet>
        <servlet-name>spring</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>spring</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>

这个阴差阳错的对应照成了,本该去找静态网页的链接,变成交给sping处理了,而spring的controller里是没有对应处理函数的。

难怪系统报The requested resource () is not available.错。

处置方式也简单,将静态文件名修改成claimer.htm,少写一个l。这样就不会让spring mvc去处理了。

然后链接地址就这样写:

pages/test/transw/claimer.htm

错误:“The requested resource () is not available.”的处置的更多相关文章

  1. 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 ...

  2. 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 ...

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

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

  4. ABP PUT、DELETE请求错误405.0 - Method Not Allowed 因为使用了无效方法(HTTP 谓词) 引发客户端错误 No 'Access-Control-Allow-Origin' header is present on the requested resource

    先请检查是否是跨域配置问题,请参考博客:http://www.cnblogs.com/donaldtdz/p/7882225.html 一.问题描述 ABP angular前端部署后,查询,新增都没问 ...

  5. Webapi 跨域 解决解决错误No 'Access-Control-Allow-Origin' header is present on the requested resource 问题

    首先是web端(http://localhost:53784) 请求 api(http://localhost:81/api/)时出现错误信息: 查看控制台会发现错误:XMLHttpRequest c ...

  6. 解决Tomcat错误信息:No 'Access-Control-Allow-Origin' header is present on the requested resource | Solving Tomcat Error: No 'Access-Control-Allow-Origin' header is present on the requested resource

    最近在使用GeoServer调用Vector Tile服务时,经常会显示不出来结果.打开浏览器调试台,发现报No 'Access-Control-Allow-Origin' header is pre ...

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

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

  8. 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 ...

  9. The requested resource is not available...

    运行tomcat 提示如下错误: The requested resource () is not available的解决方案 出现这个问题,接口肯定是没问题了.问题可能有两个: 1.文件设置无法访 ...

随机推荐

  1. win8启用.net framework3.5方法

    管理员命令下执行dism.exe /online /enable-feature /featurename:NetFX3 /Source:L:\sources\sxs

  2. linux中高端内存和低端内存的概念【转】

    转自:http://blog.csdn.net/hdujinhuihui/article/details/8686817 高端内存是Linux中一个重要的概念,初涉Linux时曾经对这个概念非常迷惑. ...

  3. (七)ubuntu下编译openwrt内核的环境配置

    首先安装基本开发环境: sudo apt-get install ssh vim samba tftp nfs 安装编译openwrt须要的包: 解压openwrt包编译出错: Build depen ...

  4. java基础练习 14

    import java.util.Scanner; public class Fourtheen { /*打印出所有的"水仙花数",所谓"水仙花数"是指一个三位 ...

  5. centos6.5 网卡服务开机自动启动

    今天打开许久没用的centos之后,发现网络服务器不可用,通过service network restart 依然无法使用,简单记录一下处理过程: 1.通过setup 命令查看Network conf ...

  6. git使用教程1-本地代码上传到github【转载】

    本篇转自博客:上海-悠悠 原文地址:http://www.cnblogs.com/yoyoketang/tag/git/ 前言 不会使用github都不好意思说自己是码农,github作为一个开源的代 ...

  7. 腾讯微信支付,程序员是如何让jQuery代码付钱的

    微信支付和支付宝支付已经是我们生活中不可确实的两个金融软件了,也是必备的,小编认为小钱用微信,大钱用支付宝. 下面这个图是我们生活中用腾讯微信支付平台的最后一个页面,大家想不想知道这个页面是如果做出来 ...

  8. C++大数板子

    C++大数板子 使用样例在主函数里看就好,必要的运算符都重载了. #include <iostream> using namespace std; ;/*精度位数,自行调整*/ //1.如 ...

  9. 基于Bootstrap的下拉框插件bootstrap-select

    写在前面: 在这次的项目中,没有再使用liger-ui做为前端框架了,改为了Bootstrap,这次也好接触下新的技术,在学习的过程中发现,Bootstrap的一些组件基本都是采用class的形式,就 ...

  10. 用swift开发自己的MacOS锁屏软件(3)

    前两篇中实现了MacOS端的锁屏软件,现在需要再实现一个移动端的app用来实现和mac的通信,以后的文章可能就会两个项目来回穿插了. 写完MacOS的软件又回来接着写iOS真的是享受,看着堆积如山的各 ...