jsp 包含另一个JSP页面出错了,都显示空白页
noticSave.jsp为:<%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncodin...
noticSave.jsp为:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:include page="/public/head.jsp" flush="true" ></jsp:include>
</body>
</html>
head.jsp为:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<table>
<h1>H1111111111</h1>
</table>
在<jsp:include page="" />
当page="public/head.jsp" 显示:Fragment "public/head.jsp" was not found at expected path /news/WebRoot/notic/public/head.jsp
当page="./public/head.jsp"显示:Fragment "./public/head.jsp" was not found at expected path /news/WebRoot/notic/public/head.jsp
当page="../public/head.jsp"显示的也是空白 展开
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:include page="/public/head.jsp" flush="true" ></jsp:include>
</body>
</html>
head.jsp为:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<table>
<h1>H1111111111</h1>
</table>
在<jsp:include page="" />
当page="public/head.jsp" 显示:Fragment "public/head.jsp" was not found at expected path /news/WebRoot/notic/public/head.jsp
当page="./public/head.jsp"显示:Fragment "./public/head.jsp" was not found at expected path /news/WebRoot/notic/public/head.jsp
当page="../public/head.jsp"显示的也是空白 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询