Installation You need the Namespace.jar from the NamespacePlugin (I used the one from 26-Nov-2007 20:40). To compile the sources I took the jspwiki 2.4.104 sources and imported them as a eclipse project. I added namespace.jar to build path. After building I moved the de-packages from the classes (eclipes output) to the classes dir of the jspwiki installation. I changed the PageContent.jsp (templates/default) to the version as below (added taglib and two tags). I put the namespace.tld file to the WEB-INF dir. I changed the jspwiki.css to highlight the additions (as below) I changed the jspwiki_print.css to suppress the additions (as below) <** START: changed PageContent.jsp **> <%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %> <%@ taglib uri="/WEB-INF/namespace.tld" prefix="ns0" %> <%-- Inserts page content. --%>
<%-- If the page is an older version, then offer a note and a possibility to restore this version as the latest one. --%>
This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
<%-- Inserts no text if there is no page. --%> This page does not exist. Why don't you go and create it?

Attachments

<%=att.getFileName()%> " border="0" alt="Info on <%=att.getFileName()%>" /> <%=att.getSize()%> bytes
<** END: changed PageContent.jsp **> <** START: namespace.tld **> 1.2 1.1 jspwikinamespace InsertNamespace de.jplanets.jspwiki.tags.InsertNamespaceTag empty delimiter concat style InsertNamespaceIndexPlugin de.jplanets.jspwiki.tags.InsertNamespaceIndexPluginTag empty delimiter items exclude <** END: namespace.tld **> <** START: additions to jspwiki.css **> /* Namespace Style */ .namespace {background-color: #f0f0f0; font-size: 10px; border: 1px solid gray; } .namespace strong{font-size: 12px;} <** END: additions to jspwiki.css **> <** START: additions to jspwiki_print.css **> /* Namespace Style */ .namespace { display: none; } <** END: additions to jspwiki_print.css **> <** START: The Tag-Class to insert the namespaceplugin in a template page **> package de.jplanets.jspwiki.tags; import java.util.HashMap; import java.util.Map; import javax.servlet.jsp.JspWriter; import brushed.jspwiki.namespaceplugin.Namespace; import brushed.jspwiki.namespaceplugin.NamespaceIndexPlugin; import com.ecyrd.jspwiki.tags.WikiTagBase; public class InsertNamespaceTag extends WikiTagBase { protected Namespace m_namespace = new Namespace(); protected Map m_params = new HashMap(); public InsertNamespaceTag() { super.initTag(); m_params.clear(); } public int doWikiStartTag() throws Exception { JspWriter out = pageContext.getOut(); out.print(m_namespace.execute(m_wikiContext, m_params)); return SKIP_BODY; } public void setDelimiter(String d) { m_params.put(Namespace.PARAM_DELIMITER, d); } public String getDelimiter() { return (String)m_params.get(Namespace.PARAM_DELIMITER); } public void setConcat(String c) { m_params.put(Namespace.PARAM_CONCAT, c); } public String getConcat() { return (String)m_params.get(Namespace.PARAM_CONCAT); } public void setStyle(String s) { m_params.put(Namespace.PARAM_STYLE, s); } public String getStyle() { return (String)m_params.get(Namespace.PARAM_STYLE); } } <** END: The Tag-Class to insert the namespaceplugin in a template page **> <** START: The Tag-Class to insert the namespaceindexplugin in a template page **> package de.jplanets.jspwiki.tags; import java.util.HashMap; import java.util.Map; import javax.servlet.jsp.JspWriter; import brushed.jspwiki.namespaceplugin.Namespace; import brushed.jspwiki.namespaceplugin.NamespaceIndexPlugin; import com.ecyrd.jspwiki.tags.WikiTagBase; public class InsertNamespaceIndexPluginTag extends WikiTagBase { private static final String ITEMS_PER_LINE = "itemsPerLine"; private static final String EXCLUDE = "exclude"; protected NamespaceIndexPlugin m_namespaceindexplugin = new NamespaceIndexPlugin(); protected Map m_params = new HashMap(); public InsertNamespaceIndexPluginTag() { super.initTag(); m_params.clear(); } public int doWikiStartTag() throws Exception { JspWriter out = pageContext.getOut(); out.println("
"); out.println("Children"); out.println(m_namespaceindexplugin.execute(m_wikiContext, m_params)); out.println("
"); return SKIP_BODY; } public void setDelimiter(String d) { m_params.put(Namespace.PARAM_DELIMITER, d); } public String getDelimiter() { return (String)m_params.get(Namespace.PARAM_DELIMITER); } public void setItems(String s) { m_params.put(ITEMS_PER_LINE, s); } public String getItems() { return (String)m_params.get(ITEMS_PER_LINE); } public void setExclude(String s) { m_params.put(EXCLUDE, s); } public String getExclude() { return (String)m_params.get(EXCLUDE); } } <** END: The Tag-Class to insert the namespaceindexplugin in a template page **>