错误:“The requested resource () is not available.”的处置
做网页过程中,某页需要以新窗方式打开另一个网页,于是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.”的处置的更多相关文章
- 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 ...
- 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 ...
- 【转】tomcat 访问软连接文件夹下的网页出现404错误,description The requested resource (/xxx.html) is not available.
在 tomcat/webapps/ROOT/ 下建立一个软连接文件ln -s /home/ubuntu/report report 再到report软连接目录里建立个 report.html通过浏 ...
- 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前端部署后,查询,新增都没问 ...
- Webapi 跨域 解决解决错误No 'Access-Control-Allow-Origin' header is present on the requested resource 问题
首先是web端(http://localhost:53784) 请求 api(http://localhost:81/api/)时出现错误信息: 查看控制台会发现错误:XMLHttpRequest c ...
- 解决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 ...
- Servlet中The requested resource is not available错误
自己为了测试servlet,用MyEclipse2015写了一个简单的登录程序. 1.登录页面index.jsp. <%@ page language="java" impo ...
- 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 ...
- The requested resource is not available...
运行tomcat 提示如下错误: The requested resource () is not available的解决方案 出现这个问题,接口肯定是没问题了.问题可能有两个: 1.文件设置无法访 ...
随机推荐
- maven使用nexus服务器
1.找到maven的安装路径,例如:C:\apache-maven-3.3.9 打开conf目录下的settings.xml文件 2.在<servers>节点下,配置 <server ...
- Tomcat的context.xml说明、Context标签讲解
Tomcat的context.xml说明.Context标签讲解 1. 在tomcat 5.5之前 --------------------------- Context体现在/conf/server ...
- 【 D3.js 进阶系列 — 4.0 】 绘制箭头
转自:http://www.ourd3js.com/wordpress/?p=660 [ D3.js 进阶系列 — 4.0 ] 绘制箭头 发表于2014/12/08 在 SVG 绘制区域中作图,在绘制 ...
- yii 用户登录验证(cwebuser) yii 用户登录 (记)
yii 的确是一个强大而臃肿的框架,简单的小项目,或者只做后台接口调用的项目,建议不要用. 今天记录一下yii使用中cwebuser(Yii::app()->user->login())登 ...
- [模板]大步小步算法——BSGS算法
大步小步算法用于解决:已知A, B, C,求X使得 A^x = B (mod C) 成立. 我们令x = im - j | m = ceil(sqrt(C)), i = [1, m], j = [0, ...
- 牧场行走(LCA)
神奇传送门 好吧,这题很有意思.. 第一眼撇的时候还以为是(SPFA)呜.... 然后发现要Q次询问就想到了LCA 但是发现不是求LCA.. 于是想到了一个神奇的定律: 两点的LCA一定在u到v的最短 ...
- Duplicate the UIButton and Move it
http://stackoverflow.com/questions/19241208/duplicate-the-uibutton-and-move-it/26438692#26438692 1do ...
- linux资源限制函数getrlimit,setrlimit(转载)【转】
转自:http://blog.csdn.net/stormkey/article/details/5890512 版权声明:本文为博主原创文章,未经博主允许不得转载. getrlimit,setrli ...
- java基础练习 18
import java.util.Scanner; public class Eightheen { /*判断一个素数能被几个9整除*/ public static void main(String[ ...
- MySQL学习——基础
本文是MySQL的基础知识. Linux启动MySQL服务命令 : service mysql start Linux关闭MySQL服务命令 : service mysql stop 登录MySQL命 ...