社区
Web 开发
帖子详情
Apache+Jsver+Servlet无法显示汉字?
freerabbit
2000-03-31 05:31:00
加精
I have installed Apache/1.3.6+Jserv/1.0
and add a line into HelloWorld.java
" out.println("中文测试"); "
But the result is ????
...全文
362
5
打赏
收藏
Apache+Jsver+Servlet无法显示汉字?
I have installed Apache/1.3.6+Jserv/1.0 and add a line into HelloWorld.java " out.println("中文测试"); " But the result is ????
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zzhcom
2000-10-20
打赏
举报
回复
在jsp文件头上加上
<%@ page contentType="text/html;charset=gb2312" %>
JeasonZhao
2000-09-13
打赏
举报
回复
试试看将得到的字符串字符集转换
public static String unicodeToGB(String strIn){
byte[] b;
String strOut = null;
if(strIn == null || (strIn.trim()).equals(""))
return strIn;
try{
b = strIn.getBytes("GBK");
strOut = new String(b,"ISO8859_1");
}catch(UnsupportedEncodingException e){}
return strOut;
}
public static String GBToUnicode(String strIn){
String strOut = null;
if(strIn == null || (strIn.trim()).equals(""))return strIn;
try{
byte[] b = strIn.getBytes("ISO8859_1");
strOut = new String(b,"GBK");
}catch(Exception e){}
return strOut;
}
ejian
2000-07-13
打赏
举报
回复
将 out 定义为:PrintWriter
如:PrintWriter out = res.getWriter();
ahfei
2000-04-03
打赏
举报
回复
你是用什么编译的?如果是jb,改变project->compiler->encoding 为ISO8859_1,
如果直接用jdk,编译是加入参数-encoding ISO8859_1.
如果你不明白的话,就把你的机器区域设置为usa,编译.
土豆
2000-04-01
打赏
举报
回复
Apache
+
Servlet
+jsp的搭建
Apache
+
Servlet
+jsp的搭建
Apache
+
Servlet
+Jsp环境设置
详细列出
Apache
+
Servlet
+Jsp的环境设置,帮助初学者快速解决配置问题
Apache
+
Servlet
+jsp
Apache
+
Servlet
+jsp教程
APACHE
+
SERVLET
+JSP
本文只讨论如何在Windows NT 4.0上安装
Apache
+
Servlet
+jsp。 本文中的配置情况如下: Windows NT 4.0 jdk1_2_2-001-win.exe
apache
_1_3_12_win32.exe
Apache
ModuleJServ.dll tomcat.zip(3.0)
使用JSP+jqueryUI+java
Servlet
通过
Apache
POI实现Excel导入导出
使用JSP+jqueryUI+java
Servlet
通过
Apache
POI实现Excel导入导出
Web 开发
81,094
社区成员
341,711
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章