日期:2014-05-17  浏览次数:20586 次

JSP include 导入页面文件 导入html页面出现乱码的解决
静态导入文件
<%@   include   file= "menu.jsp"%>


动态导入文件
<jsp:include flush="true" page="/Manage/ActionPage.jsp" />

如导入的是html页面如:<%@   include   file= "menu.html"%>,那么html页面的内容会出现乱码的现像。
这时你在menu.html页面顶部加上<%@ page contentType="text/html; charset=GBK" %>问题就解决了!

如果还是不行,可以试试把charset=GBK改为charset=UTF-8。
1 楼 smallant7 2012-03-01  
设置两个页面的编码都设置成GBK到时没有乱码了,但是如果将两个页面都设置成utf-8包含进来的HTML页面则仍然乱码。。