2 Replies Latest reply on Mar 17, 2016 7:34 AM by jwhance

    JBoss EAP 6.4 - Stopped Deploying UPDATED JSP files

    jwhance

      I've run into an odd issue with JBoss EAP 6.4 on an Ubuntu Linux server with JDK 7.  Things were working fine for a couple of weeks since I installed JBoss and I've been doing some iterations of my app, a straight-up JavaEE app with JSP and Java servlets.  I've been deploying using the admin console.

       

      Here's what has started happening.  I redeploy (or undeploy and deploy) my .war file and it deploys without any errors.  But my JSP pages are never updated.  The server keeps serving up the old version of the JSP.  I've tried all manner of undeploy/redeploy, I tried copying the .war file to the deployment folder, I've tried stopping and restarting JBoss, none of those things help.

       

      The only solution I've found is to stop JBoss, delete the folder for my app under .../standalone/tmp/wor/jboss.web/default-host/<MY APP NAME>

       

      When I do that I see a java version of my jsp file (index.jsp) there jsp/index_jsp.java and then when I hit the page in my web browser the compile kicks in and I see an updated index_jsp.class file there as well.

       

      But if I don't delete that directory tree, the old JSP is there and it just sticks around.  I checked my server time and it was off by 10 minutes but I re-synched the time and that didn't change anything.

       

      I have a local copy of JBoss EAP 6.4 running on my Windows PC as a development instance and it's not having this problem there.  Also the strangest thing is that this just started happening yesterday.

       

      Thanks in advance for any suggestions.

        • 1. Re: JBoss EAP 6.4 - Stopped Deploying UPDATED JSP files
          pjhavariotis

          You can set the system property org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY to true in order to delete the JSP cache on context destroy. By using this property, all .java and .class files are removed and the JSP sources are recompiled.

          • 2. Re: JBoss EAP 6.4 - Stopped Deploying UPDATED JSP files
            jwhance

            Thanks!  That did the job...  Another of those obscure properties buried in the release notes.  Here is the text from: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/6.1.0_Release_Notes/ar01s06.html

             

            Web

            901061 - Need similar "DeleteWorkDirOnContextDestroy" configuration in EAP 6 Web Subsystem

             

            JBoss Enterprise Application Platform 6 did not recompile source JSPs on redeployment unless they were newer than the associated java or class files. Earlier versions of JBoss Enterprise Application Platform 6 did not contain the code to remove the java and class files on undeployment. This meant that if a user attempted to restore sources from an older version of a webapp, the .java and .class files were not removed which prevented the JSPs from being recompiled. The corresponding code has now been added to JBoss Enterprise Application Platform 6 and can be activated through the system property org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY. The default for this property is false. JBoss Enterprise Application Platform 6 users can now use this property to remove .java and .class files to ensure that JSP sources are recompiled.