I meant to say removing scratch dir means removing the below of line of code as mentioned in one my previous emails.Later I started using the tern removal of scratch dir.
context.setAttribute("javax.servlet.context.tempdir", getScratchDir());
The below summary would help you. Please let me know if you find any.
Case 1 :
Development =false
context.setAttribute("javax.servlet.context.tempdir", getScratchDir());
Case 1Results:
1. JSPs are getting recompiled into the specified scratch dir i.e /tmp/embedded-jetty-jsp as this folder has .class files.
2. Lower envs - All jsps are recompiled and no errors are seen; Example if the application has 100 jsp pages then we seen 100.class files
3. Production env - Only few recompiled JSP pages are seen in /tmp/embedded-jetty-jsp Example if the application has 100 jsp pages then we seen 4 .class files and caused errors - see entire stack trace listed in my first email thread. Struggling to find the root cause why only few jsp pages are recompiled.
Case 2 :
Development =false
//Removed this line of code
//context.setAttribute("javax.servlet.context.tempdir", getScratchDir());
Case 2 Results:
1. Created a directory under /tmp folder with name as jetty-0.0.0.0-9011-applicatioName-_xx-any-4301518294514062102.dir with 0 files under it. this proved jsp pages are not getting recompiled since no .class files are found under /tmp
2. no issues are encountered . Yet to take call to move the changes to prod