aspose file tools*
The moose likes JForum and the fly likes Portlet JSR168 bridge Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Portlet JSR168 bridge" Watch "Portlet JSR168 bridge" New topic
Author

Portlet JSR168 bridge

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I am developping a portlet JSR168 bridge for JForum. This bridge has to be independant of th portal and JForum version.

The portlet-bridge works very well for most of view. Unfortunatly, it cannot acces admin page due to Frames (portlet doesn't support frames) and I have to change template src to remove frames.

For futur, version, is-it possible to avoid frames?

Thx.

Khaled TLILI
[originally posted on jforum.net by ktlili]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Doesn't support frames? what a crap spec :P... well, it's from the JCP.. we can't expect much.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

Portlet JSR168 generates only fragments of HTML for "body part" of the page.

So, all tags like <html>, <head>, <link>, <frame>,... (tags that are not allowed as child of <body> ) are forbidden .


KTlili.
[originally posted on jforum.net by ktlili]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ah, I see.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

There is a alpha version of JForumPortlet Bridge.

You can find the code src at:

Jforum + bridge:
http://svn.jahia.org/svn/jforum_portlet/trunk/

Only bridge:
http://svn.jahia.org/svn/jforum_portlet/trunk/src/org/jahia/portlet/

Warning: templates have been refactored:
- remove all <html>, <head> tags
- replace <body> by <div>
- add class selectors (.jforum) for all style (avoid conflict whith portal css)
- add missing url encoding
- remove all enctype for <form> tag (not supported by the specification)

I add a "autologin" and "autoregister" user behaviour in order to synchronize whith portal user

How to deploy:
--> root directory: ant rebuild (there is a property in build.properties that sets the target directory). This task compile the code src, build a WAR and copy it in the target directory

--> hsqldb is not in web-inf lib (I put in tomcat/shared/lib for the moment)

Can be tested whith Jahia Portal v5. (There is a trial version).

Bugs.:
- After installing the JForum, you have to stop ant restart the portal. I am currently triing to fix this bug.
- encoding (ex. french language)
- some links are not yet encoded (specially link from Javascript)
- ...

I have tested whith Jahia, Postgres and hsql.

[originally posted on jforum.net by ktlili]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
ktlili wrote:Hi,

I am developping a portlet JSR168 bridge for JForum. This bridge has to be independant of th portal and JForum version.

The portlet-bridge works very well for most of view. Unfortunatly, it cannot acces admin page due to Frames (portlet doesn't support frames) and I have to change template src to remove frames.

For futur, version, is-it possible to avoid frames?

Thx.

Khaled TLILI


Hi Khaled,

I'm a newbie in portlet... I'm using jetspeed2 and I would like to get a JForum portlet... Is your portlet available somewhere ? Or could you give me some advice in order to port JForum to a portlet ?

Thanks very much,

Sebastien.
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Oups sorry, I didn't read your previous mail Khaled...

I'm going to look at Jahia

Thanks,

Sebastien.
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Khaled,

I have successfully build (9 warnings) and installed your portlet JForum 2.1.5 with Jetspeed2 and MySQL.
Just had to correct a known bug in 2.1.5 with MySql (see http://www.jforum.net/posts/list/30/1744.page)

I have put the same login and password both to jetspeed user and JForum but the auto login feature of JForum doesn't work (even after restarting JetSpeed). I need to enter the login and the password both in jetspeed and JForum...

Here are the logs:
Portal user: null
AutoConnect: do nothing
No Auto action performed
-- JForum Servelt --
value is null!! for param: httpMethod
value is null!! for param: requestURI
ActionServletRequest: RequestURI: forums/list.page
ActionServletRequest: requestType: GET
value is null!! for param: queryString
true,false,true
value is null!! for param: queryString
ServletRequestWrapper: cannot setCharacterEncoding on a PortletRequest!
value is null!! for param: module
value is null!! for param: action
ServletRequestWrapper: cannot getRemoteAddr on a PortletRequest!
From JFrorum servlet: Action is: list Module is: forums
--- --- --


Portal user: admin
Is registred: true
Process: do connect
Do auto login
Auto action performed
-- Begin process method--
Found parameter in processAction method: password,a
Found parameter in processAction method: action,validateLogin
Found parameter in processAction method: httpMethod,POST
Found parameter in processAction method: username,admin
Found parameter in processAction method: module,user
-- Finish process method--
Portal user: admin
Is registred: true
Process: already connected
No Auto action performed
-- JForum Servelt --
Found param: httpMethod,POST
value is null!! for param: requestURI
ActionServletRequest: RequestURI: forums/list.page
ActionServletRequest: requestType: POST
value is null!! for param: queryString
false,false,true
ServletRequestWrapper: cannot getContentType on a PortletRequest!
ServletRequestWrapper: cannot setCharacterEncoding on a PortletRequest!
Found param: module,user
Found param: action,validateLogin
Found param: password,a
Found param: processActionPerformed,1
Found param: httpMethod,POST
Found param: username,admin
From JFrorum servlet: Action is: validateLogin Module is: user
--- --- --

What do you think ?

Thanks,
Sebastien.
[originally posted on jforum.net by Brocoli]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

In order to get the portal username, I use this fct:

String username = request.getRemoteUser().

I test if username is not null or not "guest" (Jahia Portal: guest = non portal user). The autologin is performed only if this condition is true. In addition to that, in order to avoid loops (triing for ever to do autoconnect), JForumPortlet tries to autonnect user only one time. Else, it does nothink.

At the moment, when a portal user acces a page whith JForumPortlet, the sequence is:
Is it the first connection? (user not already registered)
--> no: register user whith password "a" (next feature, the password will be encoded) and then connect user whith password "a".
--> yes: try to connect user to JForum whith portal username and password "a". If it doesn't work (e.g: wrong password) then abord.

From the log, the portal user is "admin".

Brocoli wrote:

--- --- --


Portal user: admin
Is registred: true
Process: do connect
Do auto login
Auto action performed
-- Begin process method--
Found parameter in processAction method: password,a
Found parameter in processAction method: action,validateLogin
Found parameter in processAction method: httpMethod,POST
Found parameter in processAction method: username,admin
Found parameter in processAction method: module,user
-- Finish process method--


But admin is already recorded (at the installation step) with another password than "a". So JForum can't log "admin".

Solution: try whith another portal user.

[originally posted on jforum.net by ktlili]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi ktlili,

Thanks for your answer. I have tried with another login 'member' and it is working well.

But (there are always some but ), does it mean that everybody can log in with password 'a' ? So anybody can log as another user ?

When I log in, on the main page, I have many null fields:

Our users have posted a total of null messages
We have null registered users
The newest registered user is member
There are null online users: null registered, null guest(s) [ Administrator ] [ Moderator ]
Most users ever online was null on null
Connected users: Anonymous

What's your opinion ?

Thanks,
Sebastien.
[originally posted on jforum.net by Brocoli]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,


But (there are always some but ), does it mean that everybody can log in with password 'a' ? So anybody can log as another user ?



For the moment portal user password is not "well generated". I use "a" as password only to test the feature. Next step is to do a function that generates a "good" password.



Our users have posted a total of null messages
We have null registered users
The newest registered user is member
There are null online users: null registered, null guest(s) [ Administrator ] [ Moderator ]
Most users ever online was null on null
Connected users: Anonymous


This is an alpha version .

The main goal for me was to do a bridge that is independant of JForum-Version (and the portal, ie. Jahia, Jetspeed, Uportal,...).

You can test the stand alone version of JForum. If there is no "null", it means that it's a bug of the bridge.

KT.
[originally posted on jforum.net by ktlili]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,


But (there are always some but ), does it mean that everybody can log in with password 'a' ? So anybody can log as another user ?


Password is know "well generated".


Our users have posted a total of null messages
We have null registered users
The newest registered user is member
There are null online users: null registered, null guest(s) [ Administrator ] [ Moderator ]
Most users ever online was null on null
Connected users: Anonymous


It was bug from the bridge.

--> Bug fixed ant commited in Jahia SVN.

KT.
[originally posted on jforum.net by ktlili]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi ktlili,

Just to tell you that it is working fine.
I will be back on this portlet later... I have to work on other stuff before.

Thanks,
Sebastien.
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,
I just deployed portletBridge into liferay and everything is fine. Now i'm trying to understand how and when the Authentication module is used ?
Is it used only when i'm trying to proxy a web_page and i'm behind a proxy(authenticate to proxy with credentials given in advance) ?! Or ?
Please i really need to figure this ? If anybody knows smth please help me.
many thanks
[originally posted on jforum.net by petrons]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I've deplyed your portlet on Weblogic application server and with vignet portal...

It work, but I've some problems...

- For exemple, I can't save the modification under the configuration page of the administration control panel... When I click on "Mettre a jour", I've a 404 error.

- Also, when I'm administrator, I can modifie all the message but, if I try to modifie the the first message of a topic, I've a 404 error...

- I've also another probleme... By default, if I don't add the 'Admin' user in the general group, I can't see the created forums...

- If I try to work on your code, I can't have access to the Administrator controle... the user "Admin" isn't admin !! :S

Have you any idea to resolve my problems ??? Thanks in advance
[originally posted on jforum.net by tinico]
Damyan Slavov
Greenhorn

Joined: Nov 22, 2012
Posts: 1
Hi,
Can you tell me from where I can download JForum Portlet JSR 168, or portet bridge for JForum?
I need to integrate JForum with IBM Websphere Portal.
Thanks in advance.

Damyan Slavov,
Java Software Engineer.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Portlet JSR168 bridge