Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-10) was last changed on 27-Jan-2010 20:18 by  

This page was created on 09-Apr-2003 15:22 by

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 added one line
When invoked, a JSPWiki plugin may be given an arbitrary number of "parameters" in the form of key-value pairs.
At line 3 added 47 lines
The showParameters plugin examines its parameter table and lists all parameters that were given in the plugin invocation.
Save the source code shown at the bottom of this page into a file called {{}}. Then invoke the Java compiler as follows
(or similar - depending on the development environment you are using)
\\You may need to include JSPWiki.jar in your classpath, example:
{{{javac -classpath JSPWiki.jar}}}
Create a JAR archive containing the Java class file for the plugin. You may use the command
jar cvf showParameters.jar showParameters.class
for that purpose.
Then move that file into any directory within your wiki's class path - preferrably into the {{WEB-INF/lib/}} folder within your web server's ''web application directory'' for the JSPWiki.
Finally restart the Wiki for the plugin to be recognized.
Within wiki markup, invoke the plugin as follows
[{showParameters literal=singleWord, anotherLiteral='multiple words', number=1234, boolean=true}]
As the class resides in the default directory, there is no need neither to prefix the plugin name with a package path nor to modify the plugin search path within the JSPWiki configuration file.
You may also add any other parameters you like - the only restriction is given by the syntactic constraints imposed by JSPWiki.
The final wiki output should then contain a section like
!showParameters - lists the given plugin parameters
;literal (java.lang.String):"singleWord"
;anotherLiteral (java.lang.String):"multiple words"
;number (java.lang.String):"1234 "
;boolean (java.lang.String):"true"
__Nota bene:__ while you may omit the commas (used to separate individual name-value pairs) you should __never use double quotes (") instead of single ones (')!__ Otherwise, JSPWiki may omit some parameters or mix names and values.
At line 16 changed one line
if (ParameterMap == null) {
if (ParameterMap == null || ParameterMap.isEmpty()) {
At line 18 changed one line
At line 22 removed 5 lines
Iterator ParameterInterator = ParameterMap.keySet().iterator();
if (!ParameterInterator.hasNext()) { // this looks probable
return Result + "(no parameters given)";
At line 28 changed 2 lines
while (ParameterInterator.hasNext()) {
Object Key =;
for (Iterator ParameterInterator = ParameterMap.entrySet().iterator(); ParameterInterator.hasNext(); ) {
Map.Entry Entry = (Map.Entry);
Object Key = Entry.getKey();
At line 32 changed one line
Object Value = (Key == null ? null : ParameterMap.get(Key));
Object Value = Entry.getValue();
Version Date Modified Size Author Changes ... Change note
10 27-Jan-2010 20:18 3.613 kB to previous
9 15-Apr-2004 19:57 3.705 kB to previous | to last
8 15-Apr-2004 19:56 3.68 kB to previous | to last
7 09-Apr-2003 16:42 3.578 kB to previous | to last
6 09-Apr-2003 16:27 3.517 kB to previous | to last
5 09-Apr-2003 16:21 3.34 kB to previous | to last
4 09-Apr-2003 16:18 3.334 kB to previous | to last
3 09-Apr-2003 15:55 2.568 kB to previous | to last
2 09-Apr-2003 15:51 1.606 kB to previous | to last
1 09-Apr-2003 15:22 1.501 kB to last
« This page (revision-10) was last changed on 27-Jan-2010 20:18 by