Apache JSPWiki

Saturday August 27, 2016

Change JSPWiki's inactive session timeout value

By default, inactive JSPWiki sessions are logged out after 30 minutes. This value can be adjusted by adding the following entry to the JSPWiki's web.xml configuration file (where the session-timeout value is in minutes):


This sets inactive sessions to be logged out after one hour.

Alternatively, a session timeout value can be configured in your application server. For example, on Payara Server go to server-config > Web Container, and under the Session Properties tab set the Session Timeout value:

Configuring the session timeout value in Payara Server

Configuring the session timeout value in Payara Server

Tip: You can change the session timeout message displayed by JSPWiki when the timeout occurs by creating a wiki page named SessionExpired. It's also a good idea to add an [{ALLOW edit Admin}] ACL entry to this page.

Friday August 12, 2016

JSPWiki feature highlight: Easily embed videos and other media with Viewer

With the introduction of JSPWIki's new Haddock template comes a super-easy way to add videos and other media to your wiki pages. This is the new Viewer feature (one of the many available JSPWiki Styles).

Adding videos with Viewer is as simple as wrapping your video link with the %%viewer markup—a much easier method compared with previous video plugins. For example, the markup in the first screenshot below generates the video displayed in the second following screenshot:

Using the Viewer JSPWiki style

Using the Viewer JSPWiki style

The Viewer feature supports a wide range of online services from which video content is automatically recognised (check out the full list here).

Other neat tricks are possible with Viewer. For example, you can embed content from existing wiki links or external webpages in the same way:

Using the Viewer JSPWiki style

Using the Viewer JSPWiki style

For full details and more examples on how to use Viewer, see:

Monday August 08, 2016

Display JSPWiki page differences word-by-word

JSPWiki by default displays content differences between page versions line-by-line. This is often not fine-grained enough to easily identify specific changes—especially in longer pages with lots of content.

In JSPWiki this setting is known as the difference provider. You can configure alternative difference providers, one of which is the ContextualDiffProvider. The ContextualDiffProvider enables displaying of page version differences on a word-by-word basis.

Here's an example of page differences with the default TraditionalDiffProvider enabled:

Illustrating JSPWiki difference providers

Note that while only one word and one character has changed, the entire sentence is highlighted. For comparison here are the same changes with the ContextualDiffProvider enabled:

Illustrating JSPWiki difference providers

Clicking on the blue highlighted double arrows to the left or right of a change will jump to the previous or next change respectively:

Jumping between changes using the ContextualDiff provider

You can find more information on JSPWiki's difference providers here, and you can make the setting in your jspwiki-custom.properties file.

Tuesday August 02, 2016

JSPWiki feature highlight: Tab Completion

Continuing on from yesterday's blog post on Smart Typing Pairs, let's look at another time-saving feature in JSPWiki's Haddock plain editor: Tab Completion.

When Tab Completion is enabled, certain keywords typed into the editor will expand into JSPWiki markup when followed by a Tab keystroke.

Enable Tab Completion in the Haddock editor's settings menu:

Enabling JSPWiki Tab Completion

A good example demonstrating the use of Tab Completion is adding a table of contents. Without Tab Completion, adding a table of contents is achieved by manually entering the following markup:


To add a table of contents using Tab Completion, enter the keyword toc followed by a Tab keystroke. JSPWiki automatically expands the keyword into the full markup.

Other Tab Completion examples include the sign keyword (which inserts a user's signature and date), and the quote keyword (which creates fancy formatting for quoted content).

The full set of available keywords is listed here, and you can also add your own custom keywords.

Monday August 01, 2016

JSPWiki feature highlight: Smart Typing Pairs

A new feature in JSPWiki's Haddock editor is Smart Typing Pairs. When this setting is enabled, certain typed characters will automatically be balanced with their closing counterparts. Example characters include quotation marks, parentheses, and curly and square brackets. This saves time when entering content, as one does not have to manually close these characters: the Haddock editor will do it for you.

To try out Smart Typing Pairs, first enable it in the Haddock editor's settings menu:

JSPWiki smart typing pairs

The preference is remembered, so it's a one-time setting.

Now enter a square bracket or double quotation mark, and note that the editor will close the character for you:

JSPWiki smart typing pairs

When creating (for example) links with Smart Typing Pairs enabled, you only need to enter the opening square bracket ("[") and then paste the desired address: Haddock takes care of the rest.

You can also select existing content and enter the relevant opening character, which will automatically wrap the selection in the correct associated closing character. In the following example we want to add double quotation marks to the "Haddock Template" text:

JSPWiki smart typing pairs

First select the text:

JSPWiki smart typing pairs

And now enter Shift+" on the keyboard to enter a double quotation mark. Haddock automatically adds the associated closing character around the selection:

JSPWiki smart typing pairs

For more information please check out the Haddock Editor documentation.



Hot Blogs (today's hits)

Tag Cloud