Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2
-
Fix Version/s: 1.8.2-EE-Beta, 1.8.2-EE-GA, 1.8.3
-
Component/s: Framework
-
Labels:None
-
Environment:n/a
-
Workaround Exists:Yes
-
Workaround Description:
Description
Due to an apparent bug in Facelets 1.1.14 (fixed in Facelets 1.1.15b1) any facelet template or composition component contained within a jar is continuously refreshed, whether the file has been updated or not. This occurs when the facelets.REFRESH_PERIOD context parameter is set to a value greater than -1. Having the Facelets continuously refreshes may cause aberrant behaviour in ICEfaces applications, such as constant redirection if the refreshed Facelets are contained in the head element, and DOM diffs that are much larger than expected due to changing component ids (which occurs with auto-generated ids when a Facelet is refreshed).
This bug occurs because the Facelets 1.1.14 uses the following logic when deciding to refresh the file (DefaultFaceletFactory.needsToBeRefreshed(DefaultFacelet)):
long ttl = facelet.getCreateTime() + this.refreshPeriod;
...
URLConnection conn = url.openConnection();
is = conn.getInputStream();
long atl = conn.getLastModified();
return atl == 0 || atl > ttl;
The problem is that the org.jboss.net.protocol.file.FileURLConnection.getLastModified() method returns 0 for jarred resources, as does the implementation for other app servers, such as Glassfish 2.1, so the above method always returns true for jarred resources.
A patch was accepted into the Facelets head to correct this:
https://facelets.dev.java.net/issues/show_bug.cgi?id=336
long ttl = facelet.getCreateTime() + this.refreshPeriod;
...
URLConnection conn = url.openConnection();
is = conn.getInputStream();
long atl = conn.getLastModified();
return atl > ttl;
We should incorporate this change into icefaces-facelet jar to avoid the issue.
This bug occurs because the Facelets 1.1.14 uses the following logic when deciding to refresh the file (DefaultFaceletFactory.needsToBeRefreshed(DefaultFacelet)):
long ttl = facelet.getCreateTime() + this.refreshPeriod;
...
URLConnection conn = url.openConnection();
is = conn.getInputStream();
long atl = conn.getLastModified();
return atl == 0 || atl > ttl;
The problem is that the org.jboss.net.protocol.file.FileURLConnection.getLastModified() method returns 0 for jarred resources, as does the implementation for other app servers, such as Glassfish 2.1, so the above method always returns true for jarred resources.
A patch was accepted into the Facelets head to correct this:
https://facelets.dev.java.net/issues/show_bug.cgi?id=336
long ttl = facelet.getCreateTime() + this.refreshPeriod;
...
URLConnection conn = url.openConnection();
is = conn.getInputStream();
long atl = conn.getLastModified();
return atl > ttl;
We should incorporate this change into icefaces-facelet jar to avoid the issue.
Activity
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Description |
Due to an apparent bug in Facelets 1.1.14 (fixed in Facelets 1.1.15b1) any facelet template or composition component is continuously refreshed, whether the file has been updated or not. This occurs when the facelets.REFRESH_PERIOD context parameter is set to a value greater than -1. Having the Facelets continuously refreshes may cause aberrant behaviour in ICEfaces applications, such as constant redirection if the refreshed Facelets are contained in the head element, and DOM diffs that are much larger than expected due to changing component ids (which occurs with auto-generated ids when a Facelet is refreshed). This bug occurs because the Facelets 1.1.14 uses the following logic when deciding to refresh the file: URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl == 0 || atl > ttl; The problem is that the org.jboss.net.protocol.file.FileURLConnection.getLastModified() method returns 0 for jarred resources, as does the implementation for other app servers, such as Glassfish 2.1. A patch was accepted into the Facelets head to correct this: https://facelets.dev.java.net/issues/show_bug.cgi?id=336 URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl > ttl; We should incorporate this change into icefaces-facelet jar to avoid the issue. |
Due to an apparent bug in Facelets 1.1.14 (fixed in Facelets 1.1.15b1) any facelet template or composition component contained within a jar is continuously refreshed, whether the file has been updated or not. This occurs when the facelets.REFRESH_PERIOD context parameter is set to a value greater than -1. Having the Facelets continuously refreshes may cause aberrant behaviour in ICEfaces applications, such as constant redirection if the refreshed Facelets are contained in the head element, and DOM diffs that are much larger than expected due to changing component ids (which occurs with auto-generated ids when a Facelet is refreshed). This bug occurs because the Facelets 1.1.14 uses the following logic when deciding to refresh the file: URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl == 0 || atl > ttl; The problem is that the org.jboss.net.protocol.file.FileURLConnection.getLastModified() method returns 0 for jarred resources, as does the implementation for other app servers, such as Glassfish 2.1. A patch was accepted into the Facelets head to correct this: https://facelets.dev.java.net/issues/show_bug.cgi?id=336 URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl > ttl; We should incorporate this change into icefaces-facelet jar to avoid the issue. |
Workaround Exists | [Yes] | |
Salesforce Case | [] |
Salesforce Case | [] | |
Description |
Due to an apparent bug in Facelets 1.1.14 (fixed in Facelets 1.1.15b1) any facelet template or composition component contained within a jar is continuously refreshed, whether the file has been updated or not. This occurs when the facelets.REFRESH_PERIOD context parameter is set to a value greater than -1. Having the Facelets continuously refreshes may cause aberrant behaviour in ICEfaces applications, such as constant redirection if the refreshed Facelets are contained in the head element, and DOM diffs that are much larger than expected due to changing component ids (which occurs with auto-generated ids when a Facelet is refreshed). This bug occurs because the Facelets 1.1.14 uses the following logic when deciding to refresh the file: URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl == 0 || atl > ttl; The problem is that the org.jboss.net.protocol.file.FileURLConnection.getLastModified() method returns 0 for jarred resources, as does the implementation for other app servers, such as Glassfish 2.1. A patch was accepted into the Facelets head to correct this: https://facelets.dev.java.net/issues/show_bug.cgi?id=336 URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl > ttl; We should incorporate this change into icefaces-facelet jar to avoid the issue. |
Due to an apparent bug in Facelets 1.1.14 (fixed in Facelets 1.1.15b1) any facelet template or composition component contained within a jar is continuously refreshed, whether the file has been updated or not. This occurs when the facelets.REFRESH_PERIOD context parameter is set to a value greater than -1. Having the Facelets continuously refreshes may cause aberrant behaviour in ICEfaces applications, such as constant redirection if the refreshed Facelets are contained in the head element, and DOM diffs that are much larger than expected due to changing component ids (which occurs with auto-generated ids when a Facelet is refreshed). This bug occurs because the Facelets 1.1.14 uses the following logic when deciding to refresh the file (DefaultFaceletFactory.needsToBeRefreshed(DefaultFacelet)): long ttl = facelet.getCreateTime() + this.refreshPeriod; ... URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl == 0 || atl > ttl; The problem is that the org.jboss.net.protocol.file.FileURLConnection.getLastModified() method returns 0 for jarred resources, as does the implementation for other app servers, such as Glassfish 2.1, so the above method always returns true for jarred resources. A patch was accepted into the Facelets head to correct this: https://facelets.dev.java.net/issues/show_bug.cgi?id=336 long ttl = facelet.getCreateTime() + this.refreshPeriod; ... URLConnection conn = url.openConnection(); is = conn.getInputStream(); long atl = conn.getLastModified(); return atl > ttl; We should incorporate this change into icefaces-facelet jar to avoid the issue. |
Assignee | Ken Fyten [ ken.fyten ] |
Salesforce Case | [] | |
Fix Version/s | 1.8.3 [ 10211 ] | |
Assignee Priority | P1 | |
Assignee | Ken Fyten [ ken.fyten ] | Mark Collette [ mark.collette ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #19489 | Thu Oct 22 15:36:12 MDT 2009 | mark.collette | |
Files Changed | ||||
![]() |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Fix Version/s | 1.8.2-EE-Beta [ 10215 ] |
Fix Version/s | 1.8.2-EE-GA [ 10216 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P1 | |
Assignee | Mark Collette [ mark.collette ] |
Subversion 21507
repo : 3rd\facelets\src\java\com\sun\facelets\impl\DefaultFaceletFactory.java
Merged in the change to DefaultFaceletFactory.java corresponding to thier CVS version of 1.14 (from 1.13), as part of Facelets bugs 336, 374.
Subversion 19489
icefaces\lib\icefaces-facelets.jar
I also examined other changes to the file to see if we should merge those in as well, but the only ones of importance were already in our code-base.