HTTP Status 500 file not found error in jsp include

◇◆丶佛笑我妖孽 提交于 2019-12-02 19:08:14

问题


I include file from my root directory. Its working fine in local but when I host my site its give me:

error HTTP Status 500: "../connection.jsp" not found

My files are in

public_html/myfolder/connection.jsp

on shared hosting.

I want to include file in

public_html/myfolder/process/user-login.jsp


回答1:


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"/>


来源:https://stackoverflow.com/questions/34824557/http-status-500-file-not-found-error-in-jsp-include

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!