1 Reply Latest reply on Dec 9, 2005 5:11 AM by Vidya R

    Problem with request encoding in JBOSS 4.0.2

    Vidya R Newbie

      Hi,

      We have an application which supports Japanese language, so our default charset and encoding is set to SJIS. Things were working fine in JBOSS3.2
      but recently we migrated to JBOSS 4.0.2 since when we have the following problem:

      If we set some strings holding Japanese values in the attribute (request.setAttribute()) and try to display that on JSP, we get ???
      But earlier it was working just fine. We are sure about all the settings that we made like setting encoding type and charset for request and response.

      If I assume that the string that I get from attribute is of ISO8859_1 and try to change it to SJIS, like

      String tempName = (String) request.getAttribute("product");
      byte[] temp = tempName.getBytes("ISO8859_1");
      String productName = new String(temp, "SJIS");

      then it works fine.

      But we have a release this weekend and its impossible to change everywhere to read as ISO8859-1 and convert to SJIS !!!!

      Can anybody please help and tell me if there is any configuration in tomcat/jboss where I can set it.

      I tried setting the attribute


      in server.xml but it didn't help.

      Please help ASAP.

      Thanks

        • 1. Re: Problem with request encoding in JBOSS 4.0.2
          Vidya R Newbie

          I got the problem resolved by adding these attributes in the connector of tomcat server.xml.

          <Connector port="8080" address="${jboss.bind.address}"
          maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
          emptySessionPath="true"
          enableLookups="false" redirectPort="8443" acceptCount="100"
          connectionTimeout="20000" disableUploadTimeout="true" useBodyEncodingForURI="true" URIEncoding="SJIS"/>

          Thanks