Adding New HATS Templates to new Projects

HATS comes bundled with several default templates. Only one or two could reasonably be used in a production environment as they are just downright hideous. A template consists of a JSP, images, and stylesheets. Rather than create a new template each time you do a project, you might want to save the project so that when you create another new project, you have the option of selecting your company's template rather than the ubiquitous "swirl.jsp" template. To do so, add your template as follows:

Images and stylesheets should be put under:

C:\SDP70Shared\plugins\com.ibm.hats_7.0.0.200702062321\ predefined\projects\new\Web Content\common

The JSP template is located under the following directory:

C:\SDP70Shared\plugins\com.ibm.hats_7.0.0.200702062321\ predefined\projects\en\new\Web Content\templates

Then change the default project settings to reflect your new template. Open "application.hap" under C:\SDP70Shared\plugins\com.ibm.hats_7.0.0.200702062321\ predefined\projects\new\Web Content\WEB-INF\profiles and edit the first line to change the "swirl.jsp" to your new jsp.


If you choose to remove any existing templates, do so with caution. If you ever need to recover them, you'll have to reinstall HATS. At the very least, leave blank.jsp as it is helpful to switch back to one of the out of the box templates every once in a while, just to ensure that your new template is not the cause of some bizarre rendering issue.

Labels: