|
Template CachesAn object that implements the interface If you use the constructor that takes a File as an argument, this is assumed to be an existing directory on the file system. When you deploy your web app, it is often better to have templates loaded via the Class.getResource() mechanism. This allows all of the templates to be stored in a .jar or .war file for easy deployment. Then you would use the constructor that takes a Class and a string as an argument. The cache object attempts to load via the Class.getResource() method, prepending the name of the file with the string. You may refer to the guestbook example for sample Java code that
uses |
|