httpservletrequest in jsf

i have an application in jsf from a previous college.

now i have to implement security in it.

it would be easy to do it in struts for me, but in this jsf application i'm totally lost.

i see no httpservlet object in the application.

i need to do getRemoteUser.

but where does it fits in the application?

I see a lot of classes of objects that should go to the database, and only one RequestBean and one SessionBean class, with methods like init(), destroy() etc etc....

Can someone help me further in this?

[556 byte] By [Sunneke31a] at [2007-11-27 9:39:48]
# 1
> i see no httpservlet object in the application.> i need to do getRemoteUser.you need a reference to the external context:FacesContext.getCurrentInstance().getExternalContext()on this reference you can call getRemoteUser()hope this helps
feruduna at 2007-7-12 23:15:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

yes i found that already on another site.

but where to write it?

in requestBean? in sessionBean? or somewhere else?

in an which method?

i tried alreay to print it via system.out.println in the init function of the requestBean or the sessionBean, but i get only empty strings back OR my application crashes.

Message was edited by:

Sunneke31

Sunneke31a at 2007-7-12 23:15:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...