Adding a JSP Static Template :
- Select the type of template you want by browsing to localhost:8080/essentials for the first time where it will ask to choose between freemarker/jsp.
- Choose jsp and save .
- Browse to the Your_Project_Name/site/src/main/webapp/WEB-INF/jsp/ folder and create a folder with project name and inside it a folder called home, and add a file called home.jsp to it.
- Paste the following code into the file:
<%@ include file=”/WEB-INF/jsp/include/imports.jsp” %>
<h1>Welcome to YoungSoft Hippo Blog</h1>
- Browse to the Hippo Console at http://localhost:8080/cms/console
- Browse to the node at /hst:hst/hst:configurations/myhippoproject/hst:templates by right-clicking the node then selecting ‘Add node‘ .Name it homepage. The node type should be set to hst:template by default. Click OK to create.
- After this, click on the ‘Add Property‘ button above the properties. Add a property named hst:renderpath. Set the value to the location of the JSP file you created: jsp/projectname/home/home.jsp. Click OK to close the dialog.
- Select the hst:pages node and add a child node called home of type hst:component. Add a property hst:template to the home node with the value homepage.
- Select the hst:sitemap node and (If already added chlid node as root default then you will select root and modify hst:componentconfigurationid value as hst:pages/home ) add a child node called root of type hst:sitemapitem. Add a property called hst:componentconfigurationid and set the value to hst:pages/home. Click on the ‘Write changes to repository’ button in the top right corner to persist the changes you made.
- Open the site ( http://localhost:8080/site/) to see the home page you created.