范文 |
jsp中想要输出的中文被显示成问号?在eclipse-windows- preferences中搜索jsp,Encoding选项中选择 Chinese,此问题便可解决 问题: jsp中想要输出的中文被显示成“?” 解决方法 : 在eclipse-windows- preferences中 搜索jsp , Encoding选项中选择 Chinese 。 这样新建的jsp文件将支持中文显示。 对已经存在的jsp文件做如下修改: 将各种编码方式都改成GB18030,如下: 代码如下: <%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GB18030"> <title>Hello</title> </head> <body> 你好 </body> </html> 则“你好”可正确显示 |