The HelloWorldPlugin (or just "HelloWorld" in use) is a CeryleWikiPlugin that provides a bit more than a minimal 'Hello World' plugin, providing a core set of features (such as parameter handling and authentication checking) as a demo and beginning point for plugin development.

Parameters

  • debug = 'true' | 'false' . When true, displays debugging level information. Defaults to false.
  • text = 'content' . An optional parameter to provide alternate "Hello World" text to the plugin.
No external dependencies (other than JSPWiki).


Tests

(NOTE: these tests may fail if the plugin has not been installed.)

[{HelloWorld}]

Plugin insertion failed: Could not find plugin HelloWorldPlugin insertion failed: Could not find plugin HelloWorld

[{HelloWorld debug='true' text='Bonjour tout le monde!' 

this content is in the body. }]

Plugin insertion failed: Could not find plugin HelloWorldPlugin insertion failed: Could not find plugin HelloWorld


Notes

  • Note that plugin invocation occurs more than once per page view, as plugins get parsed and invoked during permission checks and other calls for the page's HTML content. This in itself isn't a problem, but you should know that the plugin's execute() method gets called multiple times per page view, which whatever impact that may have.
  • The plugin body is returned as a null unless it is separated from the first (parameter) line by at least one line of whitespace. This is a bug I thought fixed; apparently not.

Comments

  • Could not get this plugin to work. Try the SayHello plugin.

Well, that's not particularly helpful. You've not provided any reason or description of the problem. It's literally just about the easiest plugin there can be, so if you can't get it to work it's not been installed correctly — this has nothing to do with a problem with the plugin. The plugin needs to be compiled correctly and its jar file put in the correct place ($WIKI_HOME/WEB-INF/lib/), and the searchPath property of the jspwiki.properties file must be modified to include the package designation (i.e., org.ceryle.wiki.plugin). This is the same as with any plugin. Also note that the HelloWorldPlugin is not installed on jspwiki.org. -- MurrayAltheim, 14 Aug 2007

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java
HelloWorld.java 5.9 kB 1 10-Jul-2007 09:12 MurrayAltheim distribution of 10 July 2007
« This page (revision-3) was last changed on 13-Aug-2007 18:13 by MurrayAltheim