Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to enable gzip compression for specific folder and tell browsers to cache it's contents?
How to enable gzip compression for specific folder and tell browsers to cache it's contents? [message #1831920] Wed, 02 September 2020 21:01 Go to next message
Eslam Elbyaly is currently offline Eslam ElbyalyFriend
Messages: 1
Registered: September 2020
Junior Member
Hi, I am using Oracle APEX 20.1 and ORDS 20.2. ORDS has an embedded jetty server which I can configure using *.xml files and put them into a folder named "etc". There is a folder with static css, javascript and image files that APEX uses. I need to enable gzip compression for that folder and instruct the browser to cache it's contents for at least 12 hours.
I created an xml file in the "etc" folder with the following contents:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<filter>
   <filter-name>HeaderFilter</filter-name>
   <filter-class>org.eclipse.jetty.servlets.HeaderFilter</filter-class>
   <init-param>
     <param-name>headerConfig</param-name>
     <param-value>
      "add Cache-Control: no-cache, no-store, must-revalidate"
     </param-value>
   </init-param>
 </filter>
</Configure>

to send Cache-Control header and named it web.xml. But what happens is that ORDS craches . I am pretty sure that the problem is with the code because when I delete the file, everything works fine. Plus that the code does not refer to a specif directory i.e d:\apex\images. The other problem is that the above code is just for sending cache-control header but I do not know how to gzip compression on the folder's contents. So, I need to enable gzip for the directory's contents and need the browser to cache it's contents too. I appreciate your help with this problem. Thank you.
Re: How to enable gzip compression for specific folder and tell browsers to cache it's contents? [message #1831931 is a reply to message #1831920] Thu, 03 September 2020 07:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31469
Registered: July 2009
Senior Member
It's probably better to ask on the Jetty User mailing list:

https://accounts.eclipse.org/mailing-list/jetty-users


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Eclipse update error due to snap read-only system
Next Topic:Highlight color
Goto Forum:
  


Current Time: Mon Sep 21 20:16:16 GMT 2020

Powered by FUDForum. Page generated in 0.03612 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top