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";

我在jsp里用这个,不知道对你是否有用。呵呵!

解决方案 »

  1.   

    to: tiandiqing(天地情缘) 
    没有加你那个的是侯就是这样:°?°?°?,
    加了你那段代码就变成这样:???,另外我是加在actionform中的,jsp中怎么加啊?
      

  2.   

    http://javawebstudio.51.net/instance/index.htm
    《3、Struts完全中文显示解决方案》
      

  3.   

    页面中:<%@ page contentType="text/html; charset=gb2312" %>
         OR
            <% request.setCharcterEncoding("gb2312"); %> Action中: reponse.setContentType("text/html; charset=gb2312");  应该没有问题的!
      

  4.   

    加入我的JAVA群
    一起学习JAVA,
    一起进步!!!6276733
      

  5.   

    language="java"
    contentType="text/html; charset=GB2312"