The origin server did not find a current representation for the target resource or is not willing..
2018-02-16 22:23
1521 查看
在做java web 项目时,常报如下错误:
Description: 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/和默认的index.jsp文件 可以访问,
最后检查了好久,发现一般为如下几种情况(编译环境:Intell IDEA 2017.03)
1.检查自己在浏览器中的url写对没有,有时候大小写写错也会报错
2.检查文件内容有没有哪里写错,tomcat启动的时候只能检查语法错误,即服务器开启的情况下仍然有可能有错误,比如默认值设置错误
3.关闭服务器,在服务器中删除项目,再重新添加项目,重新启动服务器试试
4.如果都不存在以上错误,自己在浏览器中url并没有错,自己的写的jsp文件也并没有错,建议检查一下 项目名.iml 文件下的如下语句是否为true,如果是false的话,改为true,重启服务器,在浏览器中输入url,应该就不会报错了(亲测有效,因为我的默认为false,修改过后重启服务器,输入url就不报错了)
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="true" />
</content>
原创文章,请勿转载。
Description: 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/和默认的index.jsp文件 可以访问,
最后检查了好久,发现一般为如下几种情况(编译环境:Intell IDEA 2017.03)
1.检查自己在浏览器中的url写对没有,有时候大小写写错也会报错
2.检查文件内容有没有哪里写错,tomcat启动的时候只能检查语法错误,即服务器开启的情况下仍然有可能有错误,比如默认值设置错误
3.关闭服务器,在服务器中删除项目,再重新添加项目,重新启动服务器试试
4.如果都不存在以上错误,自己在浏览器中url并没有错,自己的写的jsp文件也并没有错,建议检查一下 项目名.iml 文件下的如下语句是否为true,如果是false的话,改为true,重启服务器,在浏览器中输入url,应该就不会报错了(亲测有效,因为我的默认为false,修改过后重启服务器,输入url就不报错了)
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="true" />
</content>
原创文章,请勿转载。
相关文章推荐
- The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
- 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 disclose that one exists.报该错误的一种原因。
- 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...
- 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
- The origin server did not find a current representation for the target resource or is not willing to
- 开发java web报错:The origin server did not find a current representation for the target resource or is n
- Java Web 学习笔记 The origin server did not find a current representation for the target resource or is
- Tomcat 404 error: The origin server did not find a current representation for the target resource or
- IDEA的javaweb项目的 The origin server did not find a current representation for the target resource
- Tomcat服务器The origin server did not find a current representation for the target resource错误
- 关于The origin server did not find a current representation for the target resource …………
- Web开发:关于Tomcat出现The origin server did not find a current representation for the target resourc...的问题
- 本地服务器打不开(或者 the target resource or is not willing to disclose that one exists.)
- The SQL Server Service Broker for the current database is not enabled
- (SQR 1933) The month (9月 -2012_02:01:36.000000_下午) is not valid for the current locale or database.
- DevExpress Exception Solution - The target "X" for the callback could not be found or did not implement ICallbackEventHandler
- (git问题)解决The current branch is not configured for pull No value for key remote.origin