• Quick, easy to install, easy to use, easy to expand.
  • Searchable!!! Forum search results can be easily integrated into the main search page.
  • Will work with whatever template you use.

What You Will Need:

  • Working JSPWiki instance
  • MySQL instance installed
  • Java SQL (JDBC) Jarfile like this one

That's it! In less then 15 minutes you could have a (mostly) functional forum running on your wiki. What are you waiting for!


Allright, I confess, I'm really hoping this plugin gets both interest and support, I've put a lot of work into this and I'm hoping that some of you will be willing to help make it better.

Category --> Topic --> Thread --> Post

Topic - The star of the show. When you use the [{Forum title='title'}] plugin inline in your wiki page, the Forum plugin displays all threads for that topic. If the topic does not yet exist in the database it is created. Threads can be added to this topic using the "Add Thread" button. There is also a link to select the category that contains this topic. This is entirely optional and is just a convenience feature.

Category - An optional structure to help you organize your Topics. If you create a structure of Categories (and maybe subcategories) and select which is the parent Category of your topic, you will have the option of browsing the category tree. The idea behind Categories is to provide central organization.

Thread - A single subject of discussion, a thread contains many posts related to it's subject.

Post - An individual post in a thread, can currently be edited (by the author) but not deleted. Users enter posts in standard wiki markup that is translated by the wiki engine.


Basic Installation:#

  1. Install JSPWiki and get it working
  2. Make sure you edit the line in jspwiki.baseURL= to be the url of your wiki server. Without that line the forum plugin will not work. (* see note)
  3. In the folder of whichever template you are using, make a directory called Forum. So the path should be /templates/yourtemplate/Forum/. Download the files Category_Add.jsp(info), Category_Browser.jsp(info), Category_Select.jsp(info), Post_Edit.jsp(info), Post_Save.jsp(info), style.css(info), Thread_Add.jsp(info), Thread_View.jsp(info), and Topic_View.jsp(info) into the Forum directory.
  4. Also download and and unzip them into their respective images and template_parts directories inside of the Forum folder. When you are finished the directories should look like:
    • /templates
      • /yourtemplatefolder
        • /Forum
          • /images
          • /template_parts
  5. Download Forum.jar(info) into your /WEB-INF/lib/ folder. Please note that I have attached the source files, please feel free to modify them. Just recompile and replace the class file in the jar.
    1. - The plugin itself, it takes one operator, title to tell it which Topic to display.
    2. Forum/ - All of the jsp files and the plugin use this as the connection to the database. If you want to change your connection settings you must edit and recompile this file.(and add the class file back to the jar) The default MySQL connection settings (* note 2) are:
    • Connection string: jdbc:mysql://localhost:3306/forum
    • Username / Password: sticky / wicket
  6. Download the appropriate JDBC connector for your platform from MySQL
  7. Install MySQL, create a database named forum and make sure to add a user with the username of sticky and password of wicket to have access to the forum database.
  8. Open and run create_forum.sql(info), I've been using the sql pane in MySQL Control Center, but use whatever works.

Advanced Options:#

  1. Some of you may remember my promise of searchable forums. Download and look at FindContent.jsp(info), I've modified it from the original in the default template to include a rudimentary search of the forums. All later versions of MySQL allow a full-text search, so I've done a FULLTEXT key of the text column in the Post table. (See link for more details on doing searches in MySQL.) My implementation isn't the best, it merely links you to the Topic that contained a Post containing the word or words you searched for.
    • Note - You must have at least 5 or more posts before the search will work. The way the database operates less than 5 posts will return no matches.
  2. You may also remember that I promised forums to use whatever template you choose. That's where the file comes in, edit the top.jsp and bottom.jsp files to match your template. This is usually easier than it sounds, just crack open your ViewTemplate.jsp file in your tempate folder and use what's above and below
      <wiki:CheckRequestContext context="view">
         <wiki:Include page="PageContent.jsp" />
In top.jsp and bottom.jsp respectively

The Future#

I am really hoping this plugin catches on, and I welcome comments, suggestions, and especially contributed code. I'm a little frustrated that I am limited in time and in what I know of Java. It'd be really nice to do this plugin right and I know I've only scraped the tip of the iceberg. So if you update or change this plugin in a way that you think would be useful for the rest of us, please feel free to upload your changes, comments, ideas to this page. Maybe we can make this better together.

Changes we'd like to see:#

  • General code cleanup, addition of comments, documentation. (probably mostly my responsibility, I'll work on it)
  • Handle database access with a connection pool.
  • JSP pages cleaned up, error prevention added, forums mimic more closely forums like JForum.
  • Improved search capabilities


  • Use Apache James to link newsgroups to forums, so that you can send emails or post on the forums and it will end up in the same thread.


Coming soon!

Jerry Andrews: With Tomcat 5.5/JRE 1.5.0_03, I haven't been able to make the jsp's compile: can't find "Forum". I've tried adding an import tag at the head of the .jsps, but that's not solving the problem. Is there something obvious I'm missing here? JSPWiki couldn't find "Forum" either, until I added a "." to the jspwiki.plugin.searchPath: "jspwiki.plugin.searchPath = .".

Carl Joeckel: I made some progress on this issue, but it is still far from resolved. It looks like tomcat 5.5 can only reference classes from within a JSP that are contained within a package - and had issues with the Forum class being outside the Forum package. I changed the code to put the Forum class into the Forum package (with the DB class), and the Topic_View.jsp page did compile. Unfortunetly, it looks like that change prohibits the plug-in from working properly. Anyone make better progress on this?

GWP: Hi when with the issue with tomcat 5.5 be resolved?. Also please continue with this... it would be brilliant!!... Also might be asking a lot, but can you give this a bash at working with Oracle?

Some bugs are still present: - the property jspwiki.baseURL is NOT used in all places where it should be used - the Category_Select.jsp contains some hardcoded references to a special template - the DBaseConnection uses wrong authentification scheme for mysql (at least for my installation)

--Manfred, 04-Mar-2006

"back to" Link and Links between Topic-pages seem only to work when Forum is on Startpage of the wiki.

--Manfred, 04-Mar-2006

Hi all! I've tried to fix as many bugs as possible and uploaded a patchedversion as a zip file ForumPlugin1.0/ The changes I made are mentioned in a README file inside the zip. There are still some bugs in it but now it fits my needs.

Suggest : why not add this feature that poster can inline something from JSPWikiPage ? --Manfred, 05-Mar-2006

Hi All! I've modified the plugin, this is patch(info) installed on the previous patch(info).
The tag should be: e.g. Plugin insertion failed: Could not find plugin Forum.ForumPlugin insertion failed: Could not find plugin Forum.Forum.
The updated Forum.jar included in the patch, has classes in the package Forum, to work under Tomcat 5.5. The template_parts jsps still require some more design modifications. Enjoy!

--AnonymousCoward, 01-Aug-2006

The tag should be: e.g. { Forum.Forum title='title'}

--AnonymousCoward, 01-Aug-2006

The forum didn't work for me at all. I've modified it now so that it works with version 2.4.33 and PostgreSQL, see my attachment (Actually it has been tested, but I wasn't able to rename the attachment...)

--Candid Dauth, 21-Aug-2006

Forum doesn't work for me either. I am using Tomcat 5.5 and it's now working. If I use Forum I get, could not load, but if I use Forum.Forum everything is ok, only problem is that I see nothing... Am I missing something?

... Sorry about that message. I fixed the problem, there was problem with change of database. Since all database handling is done in pages, there was problem there. I plan to move all database handling from jsp to datalayer, so that it will be easier to adapt. I also plan to make changes in structure and setting...

Structure (old):
Category --> Topic --> Thread --> Post

Structure (new):
Forum --> Group --> Category --> Topic --> Thread --> Post

Forum - There can be more forums on same wiki. This is root parent tag (can be only set in database not in runtime)

Group - On forum can be one or more groups, which contains one or more categories (run-time readonly)

Category - This is owner of certain threads. Category can not be changed in runtime.

Thread - A single subject of discussion, a thread contains many posts related to it's subject. (same as old)

Post - An individual post in a thread, can currently be edited (by the author) but not deleted. Users enter posts in standard wiki markup that is translated by the wiki engine.(same as old)

Runtime means, what user can use, all non-runtime stuff should be done in administrator part, which is not existent at this time, and it won't be so soon. I will make this admin part as external application, so that changes are written directly to db, without web interface for now.

This changes will take some time, since I won't be at home so much now in holidays time.

--Andy, 04-Jul-2007

I decided that I will move my forum changes into another topic, probably 'AT Forum Plugin 1.0'. I have started my work and I have already made so many changes that is not compatible with this version anymore. You can stay tuned for new version in Plugin list, but it will probably be a while (by the end of august it must work on my site... he he)...

--Andy, 11-Jul-2007


I got the Forum Plugin working with MySQL. Is there a solution for Oracle DB???

I think the only changes would be in modifying the SQL statements as well as the DB connection.

--MantschThomas, 27-Feb-2008

Anyone have a good sample site with this ForumPlugin1.0 in action ?

I am using JSPWiki 2.8 and trying to incorporate the Forum Plugin. I get through the installation instructions fine, but then do not see how I am actually suppose to get to the Forum itself.....

I dont know if I am doing something wrong during installation or if it is not compatible with my version of JSPWiki 2.8.

Thanks, Ken

--ken, 06-Feb-2009 22:05

Iam also facing the same problem with 2.8 version. i cant see any forum stuff on the screen, though i hav followed all the installation instructions correctly.

--Ramanadh, 11-Apr-2009 10:43

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
Category_Add.jsp 3.2 kB 1 17-Dec-2004 23:03
Category_Browser.jsp 5.4 kB 1 17-Dec-2004 23:03
Category_Select.jsp 4.0 kB 1 17-Dec-2004 23:03
java 1.6 kB 1 18-Dec-2004 01:01
FindContent.jsp 3.3 kB 1 18-Dec-2004 00:11
Forum.jar 4.4 kB 3 18-Dec-2004 00:57
java 3.9 kB 1 18-Dec-2004 01:00
JSPWiki-2.4.15-beta-plugin-For... 116.1 kB 1 01-Aug-2006 17:26
Post_Edit.jsp 6.2 kB 1 17-Dec-2004 23:03
Post_Save.jsp 1.7 kB 1 17-Dec-2004 23:03
Thread_Add.jsp 1.9 kB 1 17-Dec-2004 23:04
Thread_View.jsp 6.7 kB 1 17-Dec-2004 23:04
Topic_View.jsp 7.8 kB 2 03-Jan-2005 21:20
create_forum.sql 1.4 kB 1 17-Dec-2004 23:48
zip 93.4 kB 1 17-Dec-2004 23:06
zip 119.1 kB 1 05-Mar-2006 14:20
zip 56.0 kB 10 23-Aug-2006 11:02 Candid Dauth
style.css 1.9 kB 1 17-Dec-2004 23:04
zip 1.9 kB 1 17-Dec-2004 23:06
thread.jpg 77.7 kB 1 30-Dec-2004 23:40
topic.jpg 71.3 kB 1 30-Dec-2004 23:40
« This page (revision-94) was last changed on 16-Mar-2011 21:21 by Janne Jalkanen