解决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 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




posted on 2015-03-22 15:46  岚之山  阅读(1109)  评论(0编辑  收藏  举报

导航