Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Guide on interfacing with JForum

Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've recently tried to have my own Java web app interface with JForum, eg. programmatically make posts, edit posts, delete posts.
After finding only bits and pieces of info on this forum for how to do this, but nothing comprehensive, I would like to share with you a hopefully more complete set of steps for achieving this.

I used commons http-client to simulate a http client.


You can create a new topic in JForum by entering a URL similar to this:
http://localhost:8080/jforum/ topic subject&message=This is is a new subject

You can put that URL in the browser and it will automatically create a topic in the forum with forum_id = 1, and subject = "new topic subject",
and message = "This is is a new subject".

To achieve this in a java application using Commons Http-Client, you can use the following code:


Say you wanted to edit a post with post_id = 8 in forum with forum_id = 1, the following URL when put into the browser will do it:

http://localhost:8080/jforum/ NEW CONTENT&subject=A NEW SUBJECT

To do this in java:


The following url will delete a topic with the topic_id = 5, forum_id = 1.


To do this in java:


This method will log you in as the default admin (u: Admin, p: admin):


I hope this post is useful to somebody. I also hope the code works as I had to extract bits and pieces from my files so it hasnt been through a compiler.

This may not be the best or the only way to programmatically interface with JForum, but it has worked for me.

I learnt a lot about how to communicate with JForum using Firefox's Live Http Headers (, which shows you the headers in requests.

[originally posted on by gambit_asdf]
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic