显示的是方框等乱七八糟的东西,用的是jswdk1.0.1。

解决方案 »

  1.   

    实际只有<%=Msg%>这一语句显示的中文出了问题。其他都正常!
      

  2.   

    不是编码的事,象web server不支持,不知你的serverlet是用什么解释执行的
      

  3.   

     不好意思,我建议个烂办法,用tomcat
      

  4.   

    换Tomcat或其他服务器试试,
    可能是服务器本身对于中文处理不好
      

  5.   

    <%!
      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)
        {
          System.out.println(e.getMessage());
        }
        return "null";
      }
    %>
    <%=(Msg=getStr(Msg))%>
      

  6.   

    jsp中每个有中文的地方都要进行字符串的编码转换, 这是一个漏洞