This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

New to 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
Hi,

Its pleasure to me to appreciate JForum team for developing such a good application and my special thanks to Rafael Steil.

I am new to JForum and I need to integrate this application in my web app. Can anyone give me some inputs about how to integrate (and also some documents)

Regards..
Sridhar.

[originally posted on jforum.net by sridharmnj]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try doing a search. There are several threads on this subject.
[originally posted on jforum.net by GatorBait3]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, do a search for "sso" and "integration".

To start, you can read http://www.jforum.net/confluence/display/integration/Overview

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafael,
Thanks for your reply.

I already integrated JForum with my current web application (some extent).

*****************************************************************

Following are the steps I followed to integration.

1) Created a MyUserSSO class which implements SSO and compiled it.

2) Created JForum.jar with all JForum compiled classes. Copied JForum.jar and other remaining jar files which are in JForum lib folder, into my application's lib folder.

3) Copied JForum's web.xml file contents into my appliction's web.xml file.

4) Copied ..\JForum\images\avatar, .\smiles folders and .\transp.gif files into my application's images folder.

5) Copied templates and upgrade folders from JForum to my application root folder (into the same folder where my WEB-INF is located)

6) Copied Config folder, dwr-forum.xml and log4j.xml from JForum\WEB-INF to my application's WEB-INF folder.

7) Modified SystemGlobals.properties as below.

commented : #sso.implementation = net.jforum.sso.RemoteUserSSO
added : sso.implementation = net.jforum.sso.MyUserSSO

commented : #authentication.type = default
added : authentication.type=sso

(If you dont use MyUserSSO, no need to modify the above contents in SystemGlobals.properties)

8) put a link in my application's leftpane to ./forums/list.page and also a link from JForum (header) to my application's home page.

Now its working fine. :lol:

*****************************************************************
But, my application looks something like this..

Header
L................................R
e................................i
f................................g
t................................h
P.......Body.................t
a................................P
n................................a
e................................n
................................ e
Footer

(My application is developed by using Struts and Tiles)
when I am clicking link to forums. Its showing forums content in full page, but not like my application structure. ops: So, I am trying to get the forums content in application's body location as said above.

If any one of you, integrated JForum with struts and Tiles. Please give me some inputs how to do that. Meanwhile, I am trying to integrate with it as said above (Struts and tiles). If I succeeded, I will certainly post the further steps in my next post.

Best Regards..
Sridhar.




[originally posted on jforum.net by sridharmnj]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Sridhar,

To tell you the truth I haven't had enough time to finish what I started (non-current job related), I got some work done and I think it is the right approach if JForum app is wanted to be integrated with your App without using Portlets (integration here refers to included JForum output in custom application layout). Here are some of my thoughs about how to reach the goal and I'm more than satisfied to provide source code to any who want to finish it.

The approach I followed is described as:
Requirements:
Servlet 2.4/JSP 2.0 because Filters behavior in this version is by far better than JSP 1.2 version.
JDK 1.5
The idea behind this filter is to wrap html output from JForum by intercepting all JForum calls through Struts controller.
Sample case:

.../jforum/list.page is called (or something similar)

the filter try to read request-scoped attribute "wrapped", if it is null then call a struts action that will call a tiles .jsp page( not a .xml definition file, but a .jsp file) and response will be wrapped an an instance of HttpResponseWrapper subclass.
The struts action is required( I required) because my custom processor queries DB and store results in request scope, these results (lists, values) are used to present dynamic info in layout (header, left menu, etc..)
If request does not comes through Struts controller, your layout won't display dynamic info as your app does.

This wrapper.jsp will then include list.page(or other page) and set request attribute wrapped to "1". This nested Filter execution is not possible with JSP 1.2 specification, that is why Servlet 2.4/JSP 2.0 is required.

At this point same filter will get executed but since "wrapped" request attribute was set to 1, there won't be a recursive call to same struts action, but instead to list.page controller (using HttpResponseWrapper subclass).
When *.page html output is generated and control got back to Filter, output is processed to be included in .jsp.

It sounds confusing but I have made it in www.discrete-it.net but unfortunately I was trying to upgrade my box from FreeBSD ports and Postgres had some problems, and I dont have DB now, so it won't show up. I'll let you know as soon as I get it online again.

On the other hand not all JForum output need to be wrapped, you probably don't want smiles or dialogs wrapped in your layout, so I also include a ByPass structure to avoid calling struts action to include them in layout.

Here is a list of necessary files:
web.xml - filter declaration and mapping
Coupling.java - Filter
DuplaVO - Value Object used by Coupling.java which is initiated with some JForum paths. Those paths will be avoided when wrapping it inside your custom app layout. Smiles dialog, etc.
RequestWrapper.java - Wraps custom output.
struts-config.xml - declaration of action that will get called from filter.
tiles.jsp - tiles definition called from struts-config.xml declaration. (through ForwardInclude struts action)
IncludeAction.java - Custom IncludeAction struts subclass.
wrapper.jsp - called from tiles.jsp. This file will set wrapper parameter to avoid infinite Filter (Coupling.java) recursion and will include output from accesed list.page (or other JForum page)

Good luck and let me know if I can be of more help.

P.S. Feel free to rename package names and please FEEL FREE to help us and post your progress with it.
Thanks,
Orlando


web.xml declaration



Coupling.java
You can removed file upload-related commented code & package import.
package com.orly_otero.filters.jforum;



DuplaVO.java



ResponseWrapper.java



struts-config.xml declaration



IncludeAction.java



tiles.jsp YOUR LAYOUT



wrapper.jsp USED always as input to tiles.jsp in my particular case.


This should work, please let me know if something is missing.
[originally posted on jforum.net by orly]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ValueObject.java


[originally posted on jforum.net by orly]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic