The look and feel of your JSPWiki instance is almost exclusively driven by the JSP templates and CSS files in the selected template directory designated by your configuration file. All template files have changed between 2.4 and 2.6.

Overall rules on template writing#

Rule #1
Create your own template directory, and put your modified files in there. Do not modify the default template.
Rule #2
Put your modified files only in your own template directory. JSPWiki will check your template directory for any given JSP file. If the file does not exist, it'll try to use the one from the default template. So you can change your entire layout by simply adding your own ViewTemplate.jsp file, nothing more.

Tips and suggestions#

  • If you only plan to make color/font changes, editing jspwiki.css should be enough.
  • It is advisable to start making changes to the CSS file first before you explore the JSP files.
  • Find the style class you want to adjust by reviewing the HTML source in your browser.
  • Make version copies along the way.
  • Start and restart Tomcat and clear browser cookies as caching problems may occur.
  • The popular brushed template allows users to choose new schemes and layouts through a newly defined user preference JSP. It's good to get inspiration there.
  • Some templates allow layout changes through the CSS file while for others you will need changes in the container ViewTemplate.jsp and/or EditTemplate.jsp.
  • It is probably wise to spend some time familiarising yourself with the JSPWikiTags at your disposal.

You may add as many created templates as you wish under the template directory.

If you only plan to use a template other than the default template:

  • Close Tomcat and JSPWiki
  • Update your file: jspwiki.templateDir = newDefault
  • Restart Tomcat and JSPWiki


There are too many confusing uses of the word "default" when it comes to templates. says that jspwiki.templateDir sets the default template directory. And that the default default template directory is named "default". This page says that you can (and should) use a different template directory (not "default"), and only modified files should be in your new directory. So, is "default" the real default, and jspwiki.templateDir overrides the default, or is "default" ignored when a new default is set with jspwiki.templateDir? And where does one specify a non-default template directory, such that the default is used for missing pieces of a template?

--SteveSmith, 06-Dec-2007

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-40) was last changed on 29-Apr-2010 06:51 by MagnusL