Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing data between JSF apps  RSS feed

 
Michal Glowacki
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Could anyone give me a hint how to exchange data between JSF applications other than passing them in url? I mean JSF apps in different contexts. I need to pass info that user is logged in the system, also his id. That are quite "secret" data so I don't want to be visible when passing.

Thanks in advance,
Michal
 
Ravindra Rawat
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks like a Single SignOn requirement as in portal like application.

You can try passing a context token and the orignating application between the two applications to identify the same global session instead of a username. Initial authorization needs to be stored in a global persistent (probably) store with the string application name. Requests to second JSP apps can be authorized by checking the store for information against the context token and orignating application.

Or else
It can be much simpler if you can have a controller application which will serve as entry point to your two applications. It will put relevant information in request attributes/params before passing control to individual applications.

Thanks
Ravindra

http://anitnomad.blogspot.com
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are SSO subsystems that can be plugged into j2EE appservers. They co-ordinate behind the scenes, so that only one sign-on operation is needed.

It's a little more complicated if you want to share application data - the best way to handle that is to have the 2 applications pass data back and forth to a common back-end server, such as a DBMS.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!