解决The requested resource is not available的办法

简介: 1.问题描述:       eclipse中使用tomcat来运行HelloWorld时出现The requested resource is not available. 在报错中有一行Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching propert

1.问题描述:

      eclipse中使用tomcat来运行HelloWorld时出现The requested resource is not available.

在报错中有一行Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching property

   运行环境eclipse,tomcat-8.0.20,javaweb

1.2解决办法:

将HelloWorld.jsp文件放在/WebContent下,而不是放在/Webcontent/WEB-INF或者其他的地方。简而言之是你的jsp文件位置了。如图


如此放对位置就解决了无法访问的问题。


参看官方文献http://www.eclipse.org/forums/index.php/t/516714/

“The jsp files placed directly in WEB-INF are not served by the container to the client (see Servlet 3.0 specification, section 10.5: Directory Structure, page 99). To solve this, the jsp file should be located in WebContent.”


题外话:这个问题困扰了我一整天,说实话,找到那些所谓的解决办法真是折腾人啊,那些办法几年前可能管用,但是文章抄来抄去的,问题本质变了,却没有更新解决办法。


                                                                                                                                                 记录日期:2015/3/22




目录
相关文章
|
6月前
|
前端开发 Java
前后端分离的跨域问题解决:No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
本文介绍了解决前后端分离项目中跨域问题的方法,包括添加`CorsConfig`配置类和重写`WebMvcConfigurer`接口的`addCorsMappings`方法,允许前端请求访问后端资源,并提供了具体的代码示例。
前后端分离的跨域问题解决:No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
|
9月前
|
Kubernetes 容器 Perl
k8s部署seata 报错 没有提供足够的身份验证信息 [ http-nio-7091-exec-2] [ty.JwtAuthenticationEntryPoint] [ commence] [] : Responding with unauthorized error. Message - Full authentication is required to access this resource
Kubernetes pod 在16:12时出现两次错误,错误信息显示需要完整认证才能访问资源。尽管有此错误,但页面可正常访问。附有yaml配置文件的图片。
617 2
|
10月前
|
网络协议 Linux
Cannot assign requested address解决办法
Cannot assign requested address解决办法
【异常解决】postman请求提示Full authentication is required to access this resource
【异常解决】postman请求提示Full authentication is required to access this resource
691 0
|
API
【已解决】No ‘Access-Control-Allow-Origin‘ header is present on the requested resource
No ‘Access-Control-Allow-Origin‘ header is present on the requested resource
444 0
【已解决】No ‘Access-Control-Allow-Origin‘ header is present on the requested resource
|
JavaScript Java 应用服务中间件
Vue 跨域问题 的几种解决办法 (No ‘Access-Control-Allow-Origin‘ header is present on the requested resource)
Vue 跨域问题 的几种解决办法 (No ‘Access-Control-Allow-Origin‘ header is present on the requested resource)
2169 0
Vue 跨域问题 的几种解决办法 (No ‘Access-Control-Allow-Origin‘ header is present on the requested resource)
|
安全 JavaScript 前端开发
No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
|
API Windows
Qt-解决异常报错“QAxBase::setControl: requested control XXX could not be instantiated”
Qt-解决异常报错“QAxBase::setControl: requested control XXX could not be instantiated”
399 0
|
Web App开发 存储 安全
新版本Chrome同源策略、跨域问题处理No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
新版本Chrome同源策略、跨域问题处理No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
912 0
WampServer 3 访问403 Forbidden You don't have permission to access this resource 解决
WampServer 3 访问403 Forbidden You don't have permission to access this resource 解决
WampServer 3 访问403 Forbidden You don't have permission to access this resource 解决