Converting Template (aka "Include") Files
If a template file is changed (by a content manager for example) after the compiled solution is deployed, JTransit will use any changed template files from under the web root instead of the compiled .class files generated during the full build. You simply need to upload the changed template file. However, it is ideal to include the changed template in the full build process. If desired, a single template can be compiled at a time instead to speed the build process and still provide the fastest possible runtime performance.
After you have successfully compiled the template file, it is time to deploy to the app server. You need to create a couple directories first. Under the app server directory you should have the following structure already:
webapps/jtransit/WEB-INF
under that directory create a "classes" directory, then treat that "classes" directory like a "web root" for the compiled template files, and put the .class files in the same folders under it that the original template files would have been in under the real web root.
IMPORTANT: You must delete the original template files from under the real webroot, or JTransit will continue to use the ones on disk. This is a feature that allows you (or anyone) to make changes to any template at runtime, and upload the template under the webroot. JTransit will start using the template file on disk instead of the compiled template (no restart is needed).
For example, if you compiled the template under a directory called <webroot>/templates/foo/my.tmpl, you should end up with a MyTmpl.class file. Put it at
webapps/jtransit/WEB-INF/classes/templates/foo/MyTmpl.class
and delete the file
webapps/jtransit/templates/foo/my.tmpl
|