[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Update 20180326  XML
Forum Index -> Product
Author Message
Admin

Power User

Joined: 21/11/2007 11:36:10
Messages: 38
Offline

...is available in the download area.

Details about changes: http://www.captaincasa.com/pdf/eclnt_changelog.pdf
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5528
Offline

Please note: never ever it has been so important to check for clearing the browser cache than with this update. - If pages are not reachable "suddenly", refresh you cache.

@browser cache: with then next update the user will get some warning message if the browser version is not the same as the server version. This of course had advantages (obviously...) but also little disadvantages (spontanous replacement of .js code for test/whatever reason) - but the advantages clearly are the important ones...

Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5528
Offline

...a little bug is part of 20180326: if a scroll pane has a height of "" (not defined) then the height is calculated a little bit too high. So nothing serious at all, but maybe you stumble over this. - Bug is corrected with next version.

Regards, Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi Björn

Some of our users have had the cache problem with version 20180312.

Have you thought about forcing cache refresh silently directly without user message?
Some user may not understand what means "please empty the cache".

May be by including the version name in the JavaScript file name?
See https://stackoverflow.com/questions/8155064/how-to-programmatically-empty-browser-cache

Regards, Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5528
Offline

Hi Daniel,

CaptainCasa's web.xml by default contains a commented example to do so:

Code:
   <!-- 
       Optional: filter for setting no-cache/no-store in response header
       <filter>
         <filter-name>org.eclnt.jsfserver.util.NoCacheNoStoreFilter</filter-name>
         <filter-class>org.eclnt.jsfserver.util.NoCacheNoStoreFilter</filter-class>
       </filter>
   -->
 
   <!-- 
       <filter-mapping>
         <filter-name>org.eclnt.jsfserver.util.NoCacheNoStoreFilter</filter-name>
         <url-pattern>*.js</url-pattern>
       </filter-mapping>
       <filter-mapping>
         <filter-name>org.eclnt.jsfserver.util.NoCacheNoStoreFilter</filter-name>
         <url-pattern>*.css</url-pattern>
       </filter-mapping>
   -->
 
 


This filter flags the corresponding files in a way that the browser does not cache them, but always reads them from the server.

Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5528
Offline

Because it's simple, what happens internally, I also attach the Java code of this filter:

Code:
 package org.eclnt.jsfserver.util;
 
 import java.io.IOException;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponseWrapper;
 
 /**
  * Filter to compress content exchanged via http protocol.
  */
 public class NoCacheNoStoreFilter
     implements Filter
 {
     // ------------------------------------------------------------------------
     // inner classes
     // ------------------------------------------------------------------------
     
     class MyResponseWrapper extends HttpServletResponseWrapper 
     {
         public MyResponseWrapper(HttpServletResponse response) {
             super(response);
         }
 
         @Override
         public void setContentType(String contentType) 
         {
             super.setHeader("Expires", "-1");
             super.setHeader("Cache-Control", "no-store, no-cache");
             super.setContentType(contentType);
         }
     }
 
     public void doFilter(ServletRequest servletrequest, 
                          ServletResponse servletresponse, 
                          FilterChain filterchain)
         throws IOException, ServletException
     {
         if(servletrequest instanceof HttpServletRequest)
         {
             HttpServletRequest httpservletrequest = (HttpServletRequest)servletrequest;
             HttpServletResponse httpservletresponse = (HttpServletResponse)servletresponse;
             MyResponseWrapper responsewrapper = new MyResponseWrapper(httpservletresponse);
             filterchain.doFilter(servletrequest, responsewrapper);
         }
         else
         {
             filterchain.doFilter(servletrequest,servletresponse);
         }
     }
 
     public void init(FilterConfig filterconfig)
     {
     }
 
     public void destroy()
     {
     }
 }
 


Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Product
Go to:   
Powered by JForum 2.1.6 © JForum Team