我在WEB-INF目录中有一个JSP文件index.jsp,代码如下。
FilesName.java
package pack.cms;
public class FilesName {
//all jsp files name
public static final String FIILE_CMS_HEADER = "cms-header.jsp";
}
的index.jsp
<%@ page import="pack.cms.*"
import="java.util.*"
%>
<%@ include file=FilesName.FIILE_CMS_HEADER %>
FilesName.FIILE_CMS_HEADER = cms-header.jsp
我收到以下错误
Fragment&#34; FilesName.FIILE_CMS_HEADER&#34;未在预期路径找到/CMS/WebContent/FilesName.FIILE_CMS_HEADER
可能是什么问题和解决方案?
答案 0 :(得分:1)
<jsp:include page="<%=FilesName.FIILE_CMS_HEADER%>" ></jsp:include>