我遇到此种问题是如果包含的页面是静态时(HTML,SHTML)时,包含<%@ include file="menu.jsp"%>时是乱码?JSP包含JSP没遇到过
我遇到过(HTML)包含出现乱码?高手啊,出来啊
提示我:menu.jsp(1,1) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=GBK, new: text/html; charset=GB2312)
menu.jsp(1,1) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=GBK, new: text/html; charset=GB2312) --------------- 我 也是这样的,加上下面的语句就可以了。 <%@page contentType="text/html;charset=gb2312"%> 被包含页面和包含页面都加上,而且要一致。就可以了。
<%@ page language="java" contentType="text/html; charset=GB2312"%>
这样的代码......
你要在menu.jsp和main.jsp中也加入
<%@ page language="java" contentType="text/html; charset=GB2312"%>
这样的代码......
应该加这个。
---------------
我 也是这样的,加上下面的语句就可以了。
<%@page contentType="text/html;charset=gb2312"%>
被包含页面和包含页面都加上,而且要一致。就可以了。