做网页过程中,某页需要以新窗方式打开另一个网页,于是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. 使用java mail的网易smtp协议 发送邮件

    package com.enation.newtest; import java.security.GeneralSecurityException; import java.util.Propert ...

  2. js Event对象

    (事件阶段)Event Phases Event对象在event第一次触发的时候被创建出来,并且一直伴随着事件在DOM结构中流转的整个生命周期.event对象会被作为第一个参数传递给事件监听的回调函数 ...

  3. bzoj 2159 - Crash 的 文明世界

    Description 给定一棵\(n\le 10^5\)的树, 和\(k\le 150\) 求每个点\(x\)的\[S(x) = \sum_{y=1}^n dis(x, y) ^ k\] Analy ...

  4. WCF技术剖析 Two

    WCF终结点和寻址之--AddressHead信息匹配代码 Contracts契约 using System; using System.Collections.Generic; using Syst ...

  5. windows安装scrapy

    1.安装Twisted 直接pip install Twisted 然后报错 error: Microsoft Visual C++ 14.0 is required. Get it with &qu ...

  6. popen的用法及与system调用的区别

    首先用man查看下popen的介绍: popen(3) - Linux man page Name popen, pclose - pipe stream to or from a process S ...

  7. Appium+python自动化5-Appium Inspector【转载】

    前言    appium Inspector从入门到放弃!反正你都打开了,那就看下为什么要放弃吧! Appium Inspector是appium自带的一个元素定位工具,上一篇介绍了如何使用uiaut ...

  8. 利用System.Net.Mail 发送邮件

    我这里只是试了一下发mail的功能,感觉.net自带的发mail是比较全的,还是直接上我的code 参数文章:System.Net.Mail 发送邮件 SMTP协议 using System; usi ...

  9. (1) C语言 基础1

     VS  scanf 安全错误 在预处理器定义那里添加一行_CRT_SECURE_NO_DEPRECATE vs编译头错误 一.打印helloworld #include<stdio.h> ...

  10. 浅析 Node.js 单线程模型

    总结笔记:对于每个用户请求,由主线程接收并存放于一个事件队列中(不做任何处理),当无请求发生时,即主线程空闲,主线程开始循环处理事件队列中的任务: 对于非阻塞JS程序: 1.若某事件需要I/O操作,则 ...