Hot precompiled JSP reload

We are currently deploying our JSPs outside of the WAR. This allows us to deploy the main application container and JSP views at a different pace (one team moves much faster than the other). To support this, we have JSPs from the war. When the webapp is deployed, some soft links are created in JSP folders. Finally, when we deploy new / updated JSPs, the JspServlet detects this, recompiles the new / updated JSPs and replaces the classes.

This workflow works great when changes are minor and server load average is low. The problem arises when the developer modifies one of the main JSPs or the server load is high. In this situation, all the servers start compiling the updated JSP, and due to the load, many requests end up throwing 504 errors.

We plan to pre-compile the JSPs before deploying them to the server. The problem is that we cannot find any way to force Tomcat to reload ONLY the updated classes. All the different reboot options we tested end up reloading the entire webapp (which means 80s downtime for us).

Is there a recommended option for managing this? Does anyone have a similar scenario or a suitable solution?

Thank you very much in advance,

Tomàs

+3


source to share





All Articles