2 Replies Latest reply on Sep 3, 2020 10:18 PM by Eslam_Elbyaly

    How enable http response compression in ORDS's embedded jetty web server?


      Hi, I am using ORDS 20.2 and APEX 20.1.

      I need to know, How to enable http response compression in ORDS's embedded jetty web server to improve Oracle Application Express development environment and Oracle Application Express applications according to the documentation:



      How to accomplish this?

        • 1. Re: How enable http response compression in ORDS's embedded jetty web server?

          When running ORDS standalone, you will notice that a directory named standalone will be created within your ORDS configuration directory.  If you do not know which directory is your ORDS configuration directory, you can run the command java -jar ords.war configdir and the configuration directory will be printed out. Within the standalone directory, create a directory named etc. This is a directory that ORDS will reference for your Jetty configuration files. To enable gzip compression, create a file named jetty.xml within the etc directory with the content below:


          <?xml version="1.0"?>

          <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

          <Configure id="Server" class="org.eclipse.jetty.server.Server">

              <Call name="insertHandler">


                      <New id="GzipHandler" class="org.eclipse.jetty.server.handler.gzip.GzipHandler">

                          <Set name="minGzipSize">

                              <Property name="jetty.gzip.minGzipSize" deprecated="gzip.minGzipSize" default="2048" />


                          <Set name="checkGzExists">

                              <Property name="jetty.gzip.checkGzExists" deprecated="gzip.checkGzExists" default="false" />


                          <Set name="compressionLevel">

                              <Property name="jetty.gzip.compressionLevel" deprecated="gzip.compressionLevel" default="-1" />


                          <Set name="inflateBufferSize">

                              <Property name="jetty.gzip.inflateBufferSize" default="0" />


                          <Set name="syncFlush">

                              <Property name="jetty.gzip.syncFlush" default="false" />


                          <Set name="excludedAgentPatterns">

                              <Array type="String">


                                      <Property name="jetty.gzip.excludedUserAgent" deprecated="gzip.excludedUserAgent" default=".*MSIE.6\.0.*" />




                          <Set name="includedMethodList">

                              <Property name="jetty.gzip.includedMethodList" default="GET" />


                          <Set name="excludedMethodList">

                              <Property name="jetty.gzip.excludedMethodList" default="" />







          After saving the contents of the jetty.xml file, restart ORDS standalone and your requests should now be gzip compressed. For fine tuning, you will need to reference Jetty/Eclipse documentation on Jetty configuration.

          1 person found this helpful
          • 2. Re: How enable http response compression in ORDS's embedded jetty web server?

            Thanks EJ-Egyed for your contribution. Must the name of the xml file be named jetty.xml? Why? Or is it ok to name it in any other name? I've read in the jetty's documentation that jetty.xml is the main configuration file. https://www.eclipse.org/jetty/documentation/current/quick-start-configure.html 

            The etc/jetty.xml file is the main Jetty XML configuration file, but there are many other etc/jetty-__feature__.xml files included in the Jetty distribution.

            Will I have two files with the same name if I create jetty.xml?

            Is not it better to use configure.dtd instead of configure_9_3.dtd as the ORDS 20.2's embedded jetty is 9.4?

            I appreciate if you have time to look at the following thread too:

            How to tell browsers to cache a directory?

            Thank you.