java学习笔记20170705 The origin server did not find a current representation for the target resource or
来源:互联网 发布:c语言map容器 编辑:程序博客网 时间:2024/06/05 17:07
今天学习JSTL相关方面的知识,奈何写在jsp里面的东西,跑步起来。一直报错。
主要目的:打开jsp文件,run on server 跑起来。
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
一开始不知道为什么。甚至连http://localhost:8080/ 都打不开。也一直报同样的错误。
解决方案
1. 查看tomcat 服务器。双击窗口中服务器
看到 server locations 选项为灰色,不可选 ,且为第一个:
server locations 可选,勾选中间一个。
重新build 后 ,访问还是不能访问,报同样的错误,但是 localhost:8080已经可以访问了。不报错了。
2.检查jsp文件
网上百度了很多,发现不行。然后检查自己写的jsp文件。发现 jsp文件是放在WEB-INF 文件夹下面的。 WEB-INF文件下的 jsp文件用户是不能直接访问到的。好像是受保护的。
因此把jsp文件 挪到 WebContent文件下即可了。
正确做法是放在 WebContent 文件夹下面。 自己弄错了。希望自己谨记。
若想放到文件夹里面 也是把jsp 文件 放到 WebContent 下面的文件夹里面 。
访问路径为: localhost:8080 / 你的项目名称 / 你的放jsp的文件夹/jsp文件名称.jsp
如:http://localhost:8080/JSTLTest/jsp/JSTLTest.jsp
第一个JSTLTest 为项目名称,jsp 为 WebContent 下面的 文件夹,专门存放 jsp文件的。 然后 第二个 JSTLTest为jsp文件。需要加后缀。
- java学习笔记20170705 The origin server did not find a current representation for the target resource or
- The origin server did not find a current representation for the target resource or is not willing to
- The origin server did not find a current representation for the target resource or is not willing to
- Tomcat 404 error: The origin server did not find a current representation for the target resource or
- Tomcat服务器The origin server did not find a current representation for the target resource错误
- 开发java web报错:The origin server did not find a current representation for the target resource or is n
- 关于The origin server did not find a current representation for the target resource …………
- IDEA的javaweb项目的 The origin server did not find a current representation for the target resource
- The use of "." or not for current directory, in Java
- "The target '__Page' for the callback could not be found or did not implement ICallbackEventHandler."的解决办法
- DevExpress Exception Solution - The target "X" for the callback could not be found or did not implement ICallbackEventHandler
- WCF问题集锦:ReadResponse failed: The server did not return a complete response for this request.
- Cannot find Velocity template for URL : Did you specify the correct resource loader path?
- The packaging for this project did not assign a file to the build artifact
- The packaging for this project did not assign a file to the build artifact
- (git问题)解决The current branch is not configured for pull No value for key remote.origin
- unable to start debugging on the web server. The web server could not find the requested resource
- IIS无法启动,报错:The service did not respond to the start or control request in a timely fashion.
- Darknet—yolo实时目标检测
- MySQL数据恢复方法
- LeetCode 467 Unique Substrings in Wraparound String (思维题)
- 如何定义一个只能在堆上生成对象的类
- 基本数据结构(算法导论)与python
- java学习笔记20170705 The origin server did not find a current representation for the target resource or
- 在centos7上修改docker加速镜像为阿里云
- 更精确的浮点数的小应用(规定商品数量的商品找零)
- Android ADB常用指令(持续更新)
- Professional JS(三-statements&function)&(四-primitive&reference type)&黑画(5-another road)
- SpringBoot集成Swagger2实现Restful(类型转换错误解决办法)
- Banner+Viewpager+GridView实现首页简单布局
- Jfinal Ajax上传文件 接受JSON返回值
- Java中阻止线程执行的方法