社区
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")));
...全文
223
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
JDBC Connection [jdbc:mysql://127.0.0.1:3306/dreamcard?characterEncoding=utf-8, UserName=root@local
异常:[12:34:47.404][DEBUG][org.mybatis.spring.SqlSessionUtils][http-nio-80-exec-1] Creating a new SqlSession [12:34:47.480][DEBUG][org.mybatis.spring.SqlSessionUtils][http-nio-80-exec-1] SqlSession [
问题
排查:The
request
ed
URL
/
test
/index.
jsp
was not found on this server
问题
描述 添加一个新模块,部署在服务器上。服务器上还部署有其他模块且访问正常,新模块和其他模块共用同一个域名。服务部署之后,请求如下: http://my.domain.com/
test
/index.
jsp
返回 Not Found The
request
ed
URL
/
test
/index.
jsp
was not found on this server. 解决步骤 登入服务器,查看tomc...
No suitable driver found for jdbc:mysql://localhost:3306/
test
No suitable driver found for jdbc:mysql://localhost:3306/
test
敲入list.
jsp
或者index.
jsp
后出现这个错误,只是数据库没连上,找到了解决办法。 一是:连接
URL
格式出现了
问题
(Connection conn=DriverManager.getConnection ("jdbc:mysql://l
HttpContext.Current.
Request
.
Url
假设当前页完整地址是:http://www.
test
.com/aaa/bbb.aspx?id=5&name=kelli 协议名----http:// 域名 ---- www.
test
.com 站点名---aaa 页面名(文件名) ----bbb.aspx
参数
------id=5&name=kelli 1、完整
url
(协议名+域名+站点名+文件名+
参数
) string u
Web 开发
81,115
社区成员
341,737
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章