JSP中的HTTP状态500文件未找到错误包括 [英] HTTP Status 500 file not found error in jsp include
本文介绍了JSP中的HTTP状态500文件未找到错误包括的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我包含根目录中的文件.它在本地工作正常,但是当我托管我的网站时,它会给我:
I include file from my root directory. Its working fine in local but when I host my site its give me:
错误HTTP状态500:"../connection.jsp"未找到
error HTTP Status 500: "../connection.jsp" not found
我的文件在
public_html/myfolder/connection.jsp
public_html/myfolder/connection.jsp
在共享主机上.
我要在其中包含文件
public_html/myfolder/process/user-login.jsp
public_html/myfolder/process/user-login.jsp
推荐答案
如果public_html
是Web应用程序的根文件夹,则可以使用包含资源的绝对路径.
If public_html
is a root folder of your web application, then you can use absolute path to the included resource.
<jsp:include page="${pageContext.request.contextPath}/myfolder/connection.jsp"/>
这篇关于JSP中的HTTP状态500文件未找到错误包括的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文