Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-11630

Wrong file modified timestamp after portlet hot deployment so JSPs are not recompiled

    Details

      Description

      After hot deployment of a war containing a portlet , the 'modified' timestamp of the extracted JSP file (I assume of all extracted files) is wrong. From my tests, the modified date is adjusted for UTC (in my test case, the time is set back 0400 hrs) but it should not. The modified timestamp in the WAR archive is correct and should not be changed. This problem was observed on Linux (Ubuntu) but no other tests were conducted (ex. on Windoze) so cannot report on the behavior in other environments. Only the 'time of last modification' is changed, the other file timestamps (time of last access, time of last status change) are not changed. The consequence is that JSP files chnaged within 4 hours are not recompiled since Tomcat apparently uses the 'time of last modification' to determine if a JSP must be recompiled.

      The behaviour is illustrated with the following test result (using the Linux 'stat' command). Notice that after auto/hot deployment of the WAR file, the 'Modify' timestamp is changed from
      2010-07-27 21:32:01.000000000 -0400 to 2010-07-27 17:32:01.000000000 -0400/

      A difference of exactly 4 hours which leads me to believe that the deployment process tries to adjust the timestamp for the local time zone. Maybe this is necessary on Windows although I do not believe the file timestamp should be tampered with.

      // Extracted from portlet WAR file
      File: `organizationForm.jsp'
      Size: 7875 Blocks: 16 IO Block: 4096 regular file
      Device: 803h/2051d Inode: 4001340 Links: 1
      Access: (0644/rw-rr-) Uid: ( 1000/ laurent) Gid: ( 1000/ laurent)
      Access: 2010-07-27 21:32:02.000000000 -0400
      Modify: 2010-07-27 21:32:02.000000000 -0400
      Change: 2010-07-27 21:33:32.000000000 -0400

      // In expanded Webapp after Liferay autodeploy
      laurent@laurent-desktop:~/projects/liferay-portal-6.0.4/tomcat-6.0.26/webapps/iah-base-portlet/jsp$ stat organizationForm.jsp
      File: `organizationForm.jsp'
      Size: 7875 Blocks: 16 IO Block: 4096 regular file
      Device: 803h/2051d Inode: 4343263 Links: 1
      Access: (0644/rw-rr-) Uid: ( 1000/ laurent) Gid: ( 1000/ laurent)
      Access: 2010-07-27 21:32:44.000000000 -0400
      Modify: 2010-07-27 17:32:02.000000000 -0400
      Change: 2010-07-27 21:32:43.000000000 -0400
      $ ls -all organizationForm.jsp
      rw-rr- 1 laurent laurent 7875 2010-07-27 17:32 organizationForm.js

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 12 weeks, 5 days ago

                Packages

                Version Package
                6.1.0 CE RC1