社区
Web 开发
帖子详情
还是中文问题:url(../test.jsp?a=救救我),其中,test.jsp接受request参数并打印,weblogic6.0上运行,却总是乱码!
Mars_lee
2001-08-21 05:11:24
test.jsp内容如下:
out.println(new String(request.getParameter("a").getBytes("UTF-8")));
...全文
227
8
打赏
收藏
还是中文问题:url(../test.jsp?a=救救我),其中,test.jsp接受request参数并打印,weblogic6.0上运行,却总是乱码!
test.jsp内容如下: out.println(new String(request.getParameter("a").getBytes("UTF-8")));
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Anreddy
2002-03-06
打赏
举报
回复
.....
skyyoung
2001-08-22
打赏
举报
回复
为什么不用
java.net
Class URLEncoder
java.lang.Object
|
+--java.net.URLEncoder
static String encode(String s)
Translates a string into x-www-form-urlencoded format.
Mars_lee
2001-08-22
打赏
举报
回复
thanks!!!!!!
Mars_lee
2001-08-22
打赏
举报
回复
help..................
Mars_lee
2001-08-21
打赏
举报
回复
多谢,可还是不成....
hexiaofeng
2001-08-21
打赏
举报
回复
String getStr(String str)
{
try
{
String temp_p=str;
byte[] temp_t=temp_p.getBytes("ISO8859-1");
String temp=new String(temp_t);
return temp;
}
catch(Exception e)
{
}
return "null";
}
试一试<%@page language="java" contentType="text/html;charset=gb2312">
or
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
Mars_lee
2001-08-21
打赏
举报
回复
不成:(
hexiaofeng
2001-08-21
打赏
举报
回复
String sss ="你";
String line = new String(sss.getBytes("ISO-8859-1"),"GBK");
or
String line = new String(sss.getBytes("gb2312"));
json jar包
关于http接口开发中json格式数据编码
问题
处理 在实际工作中,接口很多时候返回json格式,但有时返回的格式会有编码
问题
假设如下接口:http://service.
test
.com/interface/getData_
test
.
jsp
返回如下是正常的。 [{"name":"\u8fd9\u662f\u4e2a\u6d4b\u8bd5"}] 但有时返回是这样的。 [{"name":"这是个测试"}] 这个是错误的。 解决办法: 主要是jar包引起的。 正确jar包如下: json-2.2.1.jar json-lib-2.4-jdk15.jar 如果:如下jar包 则有编码
问题
json-parser_fat.jar json-lib-2.4-jdk15.jar
数据库连接报错init datasource error,
url
: jdbc:mysql//
test
init datasource error,
url
: jdbc:mysql//
test
将地址改为jdbc:mysql://localhost:3306/
test
Google谷歌,Baidu百度,迅雷狗狗 等搜索引擎 调用源代码
谷歌搜索:http://www.google.com.hk/search?hl=zh-CN&source=hp&q=
TEST
百度搜索:http://www.baidu.com/s?wd=
TEST
百度贴吧:http://tieba.baidu.com/f?kw=
TEST
百度图片:http://image.baidu.com/i?ct=201326592&&word=
TEST
百度音乐:
ajax遇坑记录。。1 格式错误导致无法检测script中的所有方法 2 http://localhost:8080/../[object%20Object] 错误的
问题
解决 3 走error
1 格式错误导致无法检测script中的所有方法 错误分析:搞混了el表达式和jquery中$的用法 2 http://localhost:8080/../[object%20Object] 错误的
问题
解决 后来将$.post改为使用$.ajax,并且设置type:post,如下所示: $.ajax({ type : "post",
url
: "./
test
/ajax
Test
", }); 错误解决: 后来想想是不是jQuery版本的
问题
,将jquery-1.4.js改为jq
如何解决hadoop文件无法浏览
问题
“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“
搭建好了hadoop环境后,namenode、datanode看着都是正常的。但是当点到browser the file system时,结果报错了,报错的内容是“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“.后来我从oracel的官网上下载了jdk的11版本,上传到服务器上,解压缩,重新配置JAVA_HOME环境变量。
问题
解决。
Web 开发
81,115
社区成员
341,728
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章