Dr. Winston Prakash Ph.D. 

Personal Website

CSS based templates for similar page look and feel

One of the powerful features of Sun Java Studio Creator is the ability to save your web pages as template. New pages could be created using the saved page template. This gives a powerful way to make most of the pages in your web site with similar look and feel. I have created a simple website with one page that can be saved as template and then used to create other additional pages with that template for same look and feel. You can down load the project from here.

In order to use the page in this project as template, do the following.

  • Download the project and extract the zip
  • Open the project in Creator 2 Update 1.
  • Right click on the project (SampleTemplate1) and select "Save Project As"
  • In the dialog select the location and project name for the new project. You can also check "Add project to template list" checkbox. Next time when you create a project you will see your project as template under the Category "My Templates". You can create new project using this saved project template. (Note: Unfortunately because of a bug in Creator the package name will be same as the original project)
  • Now, open the new "Saved As" project. You should see all the contents from the original project including WebTemplate1.jsp
  • Right click on the WebTemplate1.jsp and select  "Save as Template".
  • In the popup dialog select the Category Template -> Web Pages and click OK. Your page is saved as template.
  • To create a new web page with the saved template, right click and do Web Pages -> New -> File/Folder
  • Select the WebTemplate1.jsp. (Now onwards you will see  Web Pages -> New ->WebTemplate1.jsp.

Bingo!. You have created a new page with exact look feel as the template page. Now go ahead and modify the new page as per your heart's content. You can create any number of web pages from the template with similar look and feel.

The web page template I created looks like the following image.