Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2 final
-
Fix Version/s: 1.3.5
-
Component/s: View technologies
-
Labels:None
Description
Sometimes there is a customer requirement to immediately change some information in a grails gsp file.
In war deployed mode, there should be a possibility to update gsps easily while running in production (without full reloading enabled).
Precompiled gsps classes contain the timestamp of the original gsp file in a static field called LAST_MODIFIED. If the override directory is specified it should be checked for an updated version of the gsp file. If the gsp file is newer, it should be used and compiled on the fly. There should be a parameter which defines the interval between checking for new versions of a gsp file (5000ms default).
If the war is deployed in "exploded mode", the default directory for overriding gsps is servletContext.getRealPath("/WEB-INF").
The gsps are in WEB-INF/grails-app/views and WEB-INF/plugins/*/grails-app/views directories by default in war deployed mode.
Issue Links
- is related to
-
GRAILS-5898
Selective (runtime) GSP Reloading
-
-
GRAILS-6180
Precompilation of gsp should be optional when generating the war file
-
- relates to
-
GRAILS-7161
Enable caching for GrailsViewResolver when GSP reloading is enabled in production (war-deployed)
-
This feature would be great because grails.gsp.enable.reload=true really hurts performance and reploying a WAR is too heavy for a view fix only !!
One 'easy' way to do it, might be to delete the gsp class of a view, and if Grails does not find it, it will try to recompile it from WEB-INF/grails-app/views directory