7 Replies Latest reply on Feb 2, 2003 3:54 PM by Cary Clark

    questions on migration from websphere to jboss3.0(charset)

    tsingt Newbie

      Hi,

      I am porting one ear from websphere to jboss3.0.
      It works fine now, but there still some questions.
      The first is about charset. In the jsp files,some
      sentences like this:

      String unit_name=request.getParameter("hi_unit_name");
      unit_name=unit_name==null?"":unit_name;

      Our charset is "gb2312", and it works fine in websphere.
      But when i run it in JBoss 3.0, it is wrong and I have
      to rewrite the sentences like this:

      String unit_name=request.getParameter("hi_unit_name");
      unit_name=unit_name==null?"":unit_name;
      unit_name=new String(unit_name.getBytes("8859_1"),"gb2312");

      It will be a troublesome work if I have to rewrite all my
      jsp files. Can anyone tell me how can I fix it?

      Thanks in advance! tsingt@sina.com