Try this:
<%@ page contentType="text/html; charset=ISO8859_1" %>
<%@ page contentType="text/html; charset=ISO8859_1" %>
解决方案 »
- 审核功能
- html里插入java代码的问题
- 为什么会执行了两次呢?与sql有关
- request.getParameter()取不了三个汉字?
- 可以給個OSCACHE的教程么?
- 急!!!forward跳转问题
- jsp连接SQL sever 2000时出现了“[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket”!求救!
- DecimalFormat格式问题,在线等待
- 有没有便宜的jsp空间啊,有好的推荐一个啊
- PHP,JSP,ASP之间如何传值?
- 谁能给出一个最简单的J2EE应用?(100分)
- 在网页中生成的报表,有2页的内容,如何打印时加入页眉页脚呢?(每页下都有日期)
我在以前的weblogic6.0上也是可以用的,在同事的机器上,一样的配置,一样的代码也是可以跑的。字符集转的过程中也应当没有问题。
哪位遇到过类似的问题。在weblogic中有没有专门的设置项用于对字符集进行设置的?
google上可惜没有中文的讨论组。
<%@ page contentType="text/html;charset=gb2312" %>在利用这个函数:
<!--转换中文字符的方法-->
<%!
public 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";
}
%>
<2002-8-20 上午10时27分30秒> <Error> <HTTP> <Connection failure
java.net.SocketException: ReadFile failed: ??¨??????????????á?
(error 64, fd 2104)
at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java:407)
at weblogic.servlet.internal.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java:231)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:977)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1964)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> 我在google的讨论组上看了一些帖子。暂时还没有找到和我的问题比较相像的。
哪位遇到过呀?
我得运行环境:windows2000 advanced server,p41.7G,512M DDR,数据库sqlserver7.0(oracle8.0.5).用jb7&weblogic6.1开发。
急呀!!
Recently we encounter the problem when we press the "Refresh" button(Browser MS IE) so quickly then WLS shows the error message as below: (The scenario is calling an entity bean from JSP.)******************************************************GMT+08:00 2000:<E> <HTTP>
Connection failure
java.net.SocketException: ReadFile on fd=916 failed with err=64
at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
at
weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java,
Compiled Code)
at
weblogic.socket.MuxableSocketHTTP.requeue(MuxableSocketHTTP.java,
Compiled Code)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,
Compiled Code)
at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
Compiled Code)
******************************************************
Basicly it's not hurt for our application, but we
usually need to convert the encoding of the string
selected from Database in the EJB(it mean I need to
convert the String because we need chinese). But if we
press the "Refresh" button so quickly, the chinese is
incorrect and appeared as "???????". And if we press
the button later and slowly then the chinese is
correct.
Can someone give me some clue about that ? Or is it related with the "Performance Pack" of WLS...?下面是一个weblogic开发者的回答:
This is a harmless error which means that the client has closed the socket
without telling the server. In this case it looks like a keep-alive HTTP
socket. The server has processed one request and is attempting to read
another when it gets this error. Since this is an NT specific exception we
were reporting it as a "true" problem rathern than just squelching it. I
believe that later service packs against 5.1 do squelch this so that your
logs don't get filled with these messages.现在我应当怎么办呀?
public static String UnicodeToChinese(String s){
try{
String newstring=null;
newstring=new String(s.getBytes("ISO8859_1"),"gb2312");
return newstring;
}
catch(UnsupportedEncodingException e)
{
return s;
}
}