PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-21241

tomcat7 fails to reload jsp that has been updated by server-manager-web delta update mechanism

    Details

    • Similar Issues:
      Show 5 results 

      Description

      When a portlet plugin is deployed by Liferay IDE using the new server-manager-web API, it deploys the war to the remote server and deploys normally. However, when Liferay IDE deploys a delta-war update to just change one deployed file (view.jsp), the new view.jsp file is correctly updated in the webapps folder of the remote tomcat via the server-manager-web API however, tomcat does not reload the JSP.

        Activity

        Gregory Amerson created issue -
        Hide
        Gregory Amerson added a comment -

        During the portlet deploy process it will copy a META-INF/context.xml file that has the following contents:

        <Context
        antiJARLocking="true"
        antiResourceLocking="true"
        />

        This causes tomcat7 to create a complete copy of all the times to the temp/ folder and open those files instead of the ones residing in webapps.

        The problem comes when the developer makes a change to a single file (view.jsp), and then pushes that update to the server via the sever-manager-web API. The server-manager-web will update the single file in the webapps/<context> deployed location. However this will not affect tomcat's jsp reloading logic since it is looking at the JSP that is in the temp directory due to the antiResouceLocking=true setting.

        What is interesting is that tomcat6 the context.xml file with the antiResourceLocking=true setting was still being set but tomcat6 doesn't seem to honor that setting. however, tomcat7 does now pay attention.

        This is going to break one of the key features of Remote development for plugins, being able to update just a single jsp/java/resource file in a portlet and avoid having to re-deploy the entire application which involves uploading potentially large war files and waiting for the redeploy/ reloading of context on server's side.

        Show
        Gregory Amerson added a comment - During the portlet deploy process it will copy a META-INF/context.xml file that has the following contents: <Context antiJARLocking="true" antiResourceLocking="true" /> This causes tomcat7 to create a complete copy of all the times to the temp/ folder and open those files instead of the ones residing in webapps. The problem comes when the developer makes a change to a single file (view.jsp), and then pushes that update to the server via the sever-manager-web API. The server-manager-web will update the single file in the webapps/<context> deployed location. However this will not affect tomcat's jsp reloading logic since it is looking at the JSP that is in the temp directory due to the antiResouceLocking=true setting. What is interesting is that tomcat6 the context.xml file with the antiResourceLocking=true setting was still being set but tomcat6 doesn't seem to honor that setting. however, tomcat7 does now pay attention. This is going to break one of the key features of Remote development for plugins, being able to update just a single jsp/java/resource file in a portlet and avoid having to re-deploy the entire application which involves uploading potentially large war files and waiting for the redeploy/ reloading of context on server's side.
        Hide
        Gregory Amerson added a comment -

        The original reason this file was put in was this bug:
        http://issues.liferay.com/browse/LEP-4981

        It seems that people were unable to undeploy portlets using tomcat's update-manager due to windows file locking. I believe that we could fix this issue and only add the fix to liferay 6.1 and not backport it to enable the new style of remote development.

        Show
        Gregory Amerson added a comment - The original reason this file was put in was this bug: http://issues.liferay.com/browse/LEP-4981 It seems that people were unable to undeploy portlets using tomcat's update-manager due to windows file locking. I believe that we could fix this issue and only add the fix to liferay 6.1 and not backport it to enable the new style of remote development.
        Gregory Amerson made changes -
        Field Original Value New Value
        Assignee SE Support [ support-lep@liferay.com ] Gregory Amerson [ gregory.amerson ]
        Fix Version/s --Sprint - 09/11 [ 10693 ]
        Gregory Amerson made changes -
        Fix Version/s 6.1.X [ 10655 ]
        Hide
        Gregory Amerson added a comment -

        Proposed fix is to simply remove automatically adding this context.xml to portlet plugins (or any other plugin where it would cause a problem for remote development). It seems that the problem this was meant to (unable to undeploy portlets using tomcat's update-manager) is very old. I believe the benefits of enabling delta-update feature in remote development outweights the negatives with not putting this in default.

        Show
        Gregory Amerson added a comment - Proposed fix is to simply remove automatically adding this context.xml to portlet plugins (or any other plugin where it would cause a problem for remote development). It seems that the problem this was meant to (unable to undeploy portlets using tomcat's update-manager) is very old. I believe the benefits of enabling delta-update feature in remote development outweights the negatives with not putting this in default.
        Gregory Amerson made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Gregory Amerson made changes -
        Status In Progress [ 3 ] In Review [ 10006 ]
        Brian Chan made changes -
        Status In Review [ 10006 ] Manual Testing [ 10007 ]
        Michael Saechang made changes -
        Labels QA-R
        Ryan Wan made changes -
        Assignee Gregory Amerson [ gregory.amerson ] Ryan Wan [ ryan.wan ]
        Hide
        Ryan Wan added a comment -

        PASSED Manual Testing following steps in Greg's comment.

        Reproduced on:
        Liferay IDE 1.4.0. Tomcat 7.0.22 + MySQL 5.1.58. 6.1.x revision 90445. Plugins Revision 89300.

        Fixed on:
        Liferay IDE 1.4.0. Tomcat 7.0.22 + MySQL 5.1.58. 6.1.x revision 90445. Plugins Revision 90445.

        Show
        Ryan Wan added a comment - PASSED Manual Testing following steps in Greg's comment. Reproduced on: Liferay IDE 1.4.0. Tomcat 7.0.22 + MySQL 5.1.58. 6.1.x revision 90445. Plugins Revision 89300. Fixed on: Liferay IDE 1.4.0. Tomcat 7.0.22 + MySQL 5.1.58. 6.1.x revision 90445. Plugins Revision 90445.
        Ryan Wan made changes -
        Status Manual Testing [ 10007 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Gregory Amerson added a comment -

        Nice work!

        Show
        Gregory Amerson added a comment - Nice work!
        Hide
        Vicki Tsang added a comment -

        This is being bulk closed in preparation for the new workflow.

        Show
        Vicki Tsang added a comment - This is being bulk closed in preparation for the new workflow.
        Vicki Tsang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Vicki Tsang made changes -
        Workflow Liferay Workflow 2.2 [ 256880 ] LPS Workflow [ 282950 ]
        Andrew Kim made changes -
        Workflow LPS Workflow [ 282950 ] Copy of LPS Workflow [ 427207 ]
        Andrew Kim made changes -
        Workflow Copy of LPS Workflow [ 427207 ] LPS Workflow [ 458817 ]
        Andrew Kim made changes -
        Workflow LPS Workflow [ 458817 ] Copy 2 of LPS Workflow [ 491184 ]
        Andrew Kim made changes -
        Workflow Copy 2 of LPS Workflow [ 491184 ] LPS Workflow [ 523070 ]
        Randy Zhu made changes -
        Workflow LPS Workflow [ 523070 ] PUBLIC - LPS Generic Workflow [ 574944 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS Generic Workflow [ 574944 ] Copy of PUBLIC - LPS Generic Workflow [ 609254 ]
        Randy Zhu made changes -
        Workflow Copy of PUBLIC - LPS Generic Workflow [ 609254 ] PUBLIC - LPS Generic Workflow [ 641183 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS Generic Workflow [ 641183 ] PUBLIC - LPS General Workflow [ 734515 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS General Workflow [ 734515 ] PUBLIC - LPS Bugs Workflow [ 830095 ]
        Esther Sanz made changes -
        Component/s Tools > Plugins SDK [ 11769 ]
        Component/s Tools > Plugins SDK > Portlets [ 10301 ]
        Esther Sanz made changes -
        Component/s Environments [ 18012 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        37m 15s 1 Gregory Amerson 16/Sep/11 2:44 AM
        In Progress In Progress In Review In Review
        10s 1 Gregory Amerson 16/Sep/11 2:44 AM
        In Review In Review Manual Testing Manual Testing
        3d 11h 58m 1 Brian Chan 19/Sep/11 2:43 PM
        Manual Testing Manual Testing Resolved Resolved
        21d 12h 18m 1 Ryan Wan 11/Oct/11 3:01 AM
        Resolved Resolved Closed Closed
        26d 21h 31m 1 Vicki Tsang 06/Nov/11 11:32 PM

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 21 weeks, 3 days ago

              Development

                Structure Helper Panel