在每一页加上下面:
<%@ page contentType="text/html; charset=gb2312" %>
解决动态页面编码问题
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
解决静态页面编码问题
<%@ include file="Computer.jsp"%>
静态include是指,该语句↑的「file」属性不能带变量或参数传递。
例:<%@ include file="<%=myURL%>" %>
<%@ include file="Computer.jsp?param=mm" %>
都是不对的。
-------------------------------------------------------------
动态<jsp:include page="Computer.jsp" />
对此page属性还可动态赋值。
例:<% String myURL="Computer.jsp"; %>
<jsp:include page="<%=myURL%>" />
-----------------------------------------------------------
静态与动态的include与页面内容无关。
但是动态的include带有flush属性,设定为flush="true"时,页面可刷新!