You can use the "SET" directive to define a variable that exists only in the page.
For example:
[{SET foo='bar'}]
creates a variable called "foo", which has the value of "bar". You can access this value anywhere on your page by using the shorthand "[{$foo}]".
JSPWiki also defines all kinds of other variables, and tags and plugins can also add their own variables. For example, see the Counter plugin. The following variables are pre-defined by JSPWiki:
This is the name of this Wiki. It has been set by the administrator in "jspwiki.properties". This Wiki is called JSPWiki.
The base URL address for this wiki. The value is .
Describes the character encoding used in this Wiki. An encoding of "UTF-8" means that the Wiki accepts any character, including Chinese, Japanese, etc. Encoding "ISO-8859-1" means that only western languages are supported. This wiki uses the UTF-8 encoding.
Lets you know which image types are being inlined. The value is *.png, *.jpg.
Writes HTML code for supported InterWiki links. The value is TWiki --> http://twiki.org/cgi-bin/view/TWiki/%s, WikiWikiWeb --> http://c2.com/cgi/wiki?%s, Reader --> Wiki.jsp?page=%s&skin=reader, Wikipedia --> http://www.wikipedia.com/wiki/%s, Raw --> Wiki.jsp?page=%s&skin=raw, Doc --> http://jspwiki-wiki.apache.org/Wiki.jsp?page=%s, Google --> http://www.google.com/search?q=%s, JIRA --> https://issues.apache.org/jira/browse/JSPWIKI-%s, RSS --> rss.jsp?page=%s&mode=wiki, Group --> Group.jsp?group=%s, Edit --> Edit.jsp?page=%s, Location --> https://maps.google.com/maps?q=%s, MeatballWiki --> http://usemod.com/cgi-bin/mb.pl?%s, JSPWiki --> https://jspwiki-wiki.apache.org/%s.
Inserts the version number of the JSPWiki engine. For example, this version is 2.12.1.
adds keywords to a page. They will be shown in the info drop-down menu, and are added as META tags to the page. This keywords will also be used to index the page.
Shows how the current user has logged in. For example, you are anonymous.
Inserts the current page name. Example: This page is called WikiVariable.
The current PageProvider. The current provider is org.apache.wiki.providers.CachingProvider.
A verbose, HTML description about the currently used page provider. The description for the current provider is Real provider: org.apache.wiki.providers.VersioningFileProvider. Page cache hits: 1258221924. Page cache misses: 12. History cache hits: 143343. History cache misses: 413.
The current RequestContext. For example, this is the view context.
The total number of pages available in this Wiki. This wiki contains 412 pages.
Inserts the amount of time since this Wiki has been last restarted. This wiki has been up for 88d, 23h 36m 27s.
Inserts the current user name: For example, you are now logged in as 18.219.12.88.
You can also access some of the JSPWiki properties (that have been defined by the site maintainer) by using their property names directly. See SystemInfo for an example.
Note that some properties might not be accessible due to security reasons.
The variables are evaluated in the following order: