我有代码(现在在github中),例如:
my.jsp(一个通用的 jsp——我所有的 jspS 或多或少都遵循这个模式):
<%@ include file="include/top.jsp" %>
<title>THE TITLE</title>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ include file="include/head.jsp" %>
<%@ include file="include/no_menu.jsp" %>
CONTENT
<%@ include file="include/bottom.jsp" %>
在哪里 :
顶部.jsp:
<%@ page session="false"%>
<%@ include file="tag_libs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
头.jsp:
<link href="${pageContext.request.contextPath}/css/twoColFixLtHdr.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container"><!-- closes in bottom -->
<div class="header"><!-- closes in menu -->
<p>
<a href="home"> <img src="${pageContext.request.contextPath}/images/logo7.jpg"
alt="Ted 2012 Logo" name="Ted 2012 Logo" id="Ted_2012_Logo"
style="background: display:block; padding: 5px 20px; margin-left: 150px; border-style: solid" /></a>
</p>
<hr />
no_menu.jsp:
</div>
<div class="content">
底部.jsp:
</div>
<div class="footer">
<p>
blah
</p>
</div>
</div>
</body>
</html>
如您所见-或者您可以相信我的话-标签正确平衡。我的问题是 -为什么我不能包括
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
top.jsp
我的文件中的指令?相信我,它什么也没做。我应该担心<%@ page session="false"%>
同样被忽略吗?
谢谢