4 Replies Latest reply on Mar 12, 2012 9:39 PM by iran zhou

    URIEncode on JBoss 7

    William Borgo Newbie

      Hi,

       

      Can somebody help me with configuring the URIEncode on JBoss 7?

       

      I'm using the JBoss 7.0.1 Final and want to set the URIEncode to "UTF-8" or any other that can accept accents.

       

      In JBoss 6 I altered the server.xml file and it works for me, but now, in the version 7, we don't have this file and I could not found a answer about this on the web.

       

       

      Thanks and sorry for my poor english,

      William Borgo

        • 1. Re: URIEncode on JBoss 7
          Calebe Varga Newbie

          This will work only in jboss 7.1.0 beta 1 or highier. (URIEncoding)

           

          https://issues.jboss.org/browse/AS7-1917

           

          Inside standalone.xml insert

           

          <system-properties>

               <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>

               <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>

          </system-properties>

          • 2. Re: URIEncode on JBoss 7
            iran zhou Newbie

            Hi,

             

                 I add system-properties in standalone.xml just as you said, but I can;t start jboss since error occur as follow:

             

                 Caused by: javax.xml.stream.XMLStreamException: ParseError at[row,col]:[417,2]

                 Message: JBAS014789:Unexpected element '{urn:jboss:domain:1.1}system-properties' encountered

                 ...

             

                 My Jboss version is 7.1.0 final.

            • 3. Re: URIEncode on JBoss 7
              Calebe Varga Newbie

              Hi Iran

               

              Well i added the configuration inside domain.xml with no errors.

               

              You are insertin in the right file/location ?

               

               

               

              Using domain mode.


              domain.xml

               

              <?xml version='1.0' encoding='UTF-8'?>

               

              <domain xmlns="urn:jboss:domain:1.1">

               

                  <extensions>

                      <extension module="org.jboss.as.clustering.infinispan"/>

                      <extension module="org.jboss.as.clustering.jgroups"/>

                      <extension module="org.jboss.as.cmp"/>

                      <extension module="org.jboss.as.configadmin"/>

                      <extension module="org.jboss.as.connector"/>

                      <extension module="org.jboss.as.ee"/>

                      <extension module="org.jboss.as.ejb3"/>

                      <extension module="org.jboss.as.jacorb"/>

                      <extension module="org.jboss.as.jaxr"/>

                      <extension module="org.jboss.as.jaxrs"/>

                      <extension module="org.jboss.as.jdr"/>

                      <extension module="org.jboss.as.jmx"/>

                      <extension module="org.jboss.as.jpa"/>

                      <extension module="org.jboss.as.jsr77"/>

                      <extension module="org.jboss.as.logging"/>

                      <extension module="org.jboss.as.mail"/>

                      <extension module="org.jboss.as.messaging"/>

                      <extension module="org.jboss.as.modcluster"/>

                      <extension module="org.jboss.as.naming"/>

                      <extension module="org.jboss.as.osgi"/>

                      <extension module="org.jboss.as.pojo"/>

                      <extension module="org.jboss.as.remoting"/>

                      <extension module="org.jboss.as.sar"/>

                      <extension module="org.jboss.as.security"/>

                      <extension module="org.jboss.as.threads"/>

                      <extension module="org.jboss.as.transactions"/>

                      <extension module="org.jboss.as.web"/>

                      <extension module="org.jboss.as.webservices"/>

                      <extension module="org.jboss.as.weld"/>

                  </extensions>

               

                  <system-properties>

                      <!-- IPv4 is not required, but setting this helps avoid unintended use of IPv6 -->

                      <property name="java.net.preferIPv4Stack" value="true"/>

                      <!-- URI Properties -->

                      <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>

                      <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>

                  </system-properties>

              ...

               

              Using standalone mode.


              standalone.xml

               

              <?xml version='1.0' encoding='UTF-8'?>

              <server xmlns="urn:jboss:domain:1.1">

                  <extensions>

                      <extension module="org.jboss.as.clustering.infinispan"/>

                      <extension module="org.jboss.as.cmp"/>

                      <extension module="org.jboss.as.configadmin"/>

                      <extension module="org.jboss.as.connector"/>

                      <extension module="org.jboss.as.deployment-scanner"/>

                      <extension module="org.jboss.as.ee"/>

                      <extension module="org.jboss.as.ejb3"/>

                      <extension module="org.jboss.as.jacorb"/>

                      <extension module="org.jboss.as.jaxr"/>

                      <extension module="org.jboss.as.jaxrs"/>

                      <extension module="org.jboss.as.jdr"/>

                      <extension module="org.jboss.as.jmx"/>

                      <extension module="org.jboss.as.jpa"/>

                      <extension module="org.jboss.as.jsr77"/>

                      <extension module="org.jboss.as.logging"/>

                      <extension module="org.jboss.as.mail"/>

                      <extension module="org.jboss.as.messaging"/>

                      <extension module="org.jboss.as.naming"/>

                      <extension module="org.jboss.as.osgi"/>

                      <extension module="org.jboss.as.pojo"/>

                      <extension module="org.jboss.as.remoting"/>

                      <extension module="org.jboss.as.sar"/>

                      <extension module="org.jboss.as.security"/>

                      <extension module="org.jboss.as.threads"/>

                      <extension module="org.jboss.as.transactions"/>

                      <extension module="org.jboss.as.web"/>

                      <extension module="org.jboss.as.webservices"/>

                      <extension module="org.jboss.as.weld"/>

                  </extensions>

               

                  <system-properties>

                      <!-- URI Properties -->

                      <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>

                      <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>

                  </system-properties>

              ...

               

              Cheers

              • 4. Re: URIEncode on JBoss 7
                iran zhou Newbie

                     It works! Thank you very much~ I placed the code in the end of the file yesterday