Recover session object?

Forum sobre a ferramenta Oracle JDeveloper, ADF, OAF, etc. (Não é destinado ao aprendeziado da Linguagem Java em geral)
Post Reply
rohling
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 20
Joined: Wed, 26 Aug 2009 7:43 pm
Location: PR

As I recover a session stored in a session like this:

Select all

 
    FacesContext ctx = FacesContext.getCurrentInstance(); 
    ExternalContext ectx = ctx.getExternalContext(); 
    ectx.getSessionMap().put(key, val); 
Precise this object (UERD) in a class that implements Filter (Security Filter) to verify that the user is logged in. I also try this:
User user = (user) jsfutils.resolveexpression ("# {user}"); But this session bean in this class does not work.


Sincerely,
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

Select all

ectx.getSessionMap().get(key)
rohling
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 20
Joined: Wed, 26 Aug 2009 7:43 pm
Location: PR

It really works in other class but does not work in a class that implements filter (security filter), in

Select all

 
FacesContext ctx = FacesContext.getCurrentInstance(); 
occurs nullpointer error.

Sincerely,
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

So ..

Are you using SSO?

Post your filter
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

may be problems with your lifecycle ..

take a look at this phaselistner [url=http://www.rodrigolazoti.com.br/pt/2008 ... elistener/]aqui
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

rohling
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 20
Joined: Wed, 26 Aug 2009 7:43 pm
Location: PR

Interesting the links only that all authentication filters recovers HTTP Session UserID Thus: Request.getSession (). GetAttribute ("UserID"), which is what I can not

I am Trying to do this:
http://oracletechtips.blogspot.com/2008 ... -jaas.html
This has the example of the filter but use CAS (Central Authentication Service) http://my.opera.com/dominionspy/blog/show.dml/575983
I am almost Desisting using HTTP Session to use Application Module Session because of this: http://forums.oracle.com/forums/thread. ... 6&#3967156

I need to authenticate and use the History Colunm feature, then for authentication I should use Phaselistner and for the Historic Use http://kuba.zilp.pl/?id=761
will I test me the best solution without wanting to use JAAS?
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

Application Module Session! = Http session

The AM is connected to bench session already http ta connected to the client browser
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

then ..

this gambiarra ai of the blog guy and a way .. he is forcing the user to stay all the time in the request instead of saving in the session what would be a good practice .. but it works .

To make this history colunm just go to the implementation of your EO and the Create method set your column created_by .. It would also be a form
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

[url=http://kuba.zilp.pl/?id=761]Changing default behavior of 'History Column' in ADF Business Components
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest