Add The Link To JAMWiki

The most trivial way to add the link to JAMWiki is to edit main/webapp/WEB-INF/jsp/top.jsp that makes the header of wiki pages, by adding the lines



You even do not need to be a Java programmer to implement this change, and you can make it in compiled (or even deployed and running) installation. The main limitation of this simple solution is that the topic name directly goes into URL, so you need to care about the allowed characters in your topic name (even space character may not work).

To implement properly, you also need to modify the method view of the TopicServlet.java in main/java/org/jamwiki/servlets/ and set there the JSP variable editlink, probably using the method ServletUtil.isEditable to check if the page is actually editable for the current user:

next.add("editlink", "./Special:Edit?topic="+Utilities.encodeAndEscapeTopicName(topicName));

The variable topicName is available in the 0.8.1 version and may still be available in later versions. Unfortunately, after this change you need to rebuild the modified project in Maven and, in general, it is advisible to be a Java programmer and undestand that are you doing.

Then, in top.jsp, the following change is enough:

  

Hopefully JAMWiki will implement native support in the future.