2 Replies Latest reply on Mar 7, 2011 6:01 AM by Jean-Christophe Blanchard

    configure charset in jboss

    Jean-Christophe Blanchard Newbie

      Hi I have some pb with accents in JBOSS 5.0.

      I have JSP and HTML in the application, the JSP have no pb but not the HTML.

       

      The pages were encoded using cp1252 and they have french accents like éàè.

      I can open any editor like notepad and see normal encoding.

       

      The pb appears in the application :

       

      When a page is HTML in jboss the accents are replaced by small square.

      Using firebug the content type of the HTTP headerof the HTML page  indicate text/html;charset=ISO-8859-1

       

      Now I rename the same file with jsp and it's OK

      I load the page and no squares, every accents are OK.

      Using firebug the content type of the HTTP headerof the JSP page  indicate text/html;charset=ISO-8859-1

       

       

      There is no filter , the application use struts 1.0 .

      The pb is only in jboss on linux, in local (XP french) no problem !

       

      Some one can explain why by renaming a html in jsp all the accents are OK, with the same charset ???


      Do you know how to configure the default char set in jboss ?

       

      for me the instant solution will be renaming html in jsp, but I would like to understand because it seems something is not controlled (at my level)

       

      Thanks for you answer.


        • 1. Re: configure charset in jboss
          Wolfgang Knauf Master

          Hi,

           

          just to be sure: do you have this meta tag in the header of your HTML pages?


          <html>
          <head>
              <meta http-equiv="Content-Type" content="text/html;charset=Cp1252">

          The files are stored in "Cp1252" on your disk I assume (using e.g. Eclipse to declare the correct encoding)?

           

          Best regards

           

          Wolfgang

          • 2. Re: configure charset in jboss
            Jean-Christophe Blanchard Newbie

            Thanks for your answer in fact we had :

            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

             

            Anyway I found another bug with accents and jboss, juste for information it can be useful for some one :

            it was relatited to the apache proxy, so we changed the configuration of AJP connector :

              <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"

                     redirectPort="8443" URIEncoding="UTF-8" />