access to pumaUser from a filter - Websphere

This is a discussion on access to pumaUser from a filter - Websphere ; Hi, I use Websphere Portal Server 6.0 and I try to get the pumaUser from a filter (javax.servlet.Filter). Finally, It always return null value. Here my code : __________________________________________________ ________________________ Context ctx = new InitialContext(); Name myjndiname = new CompositeName(com.ibm.portal.um.PumaHome.JNDI_NAME ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: access to pumaUser from a filter

  1. access to pumaUser from a filter

    Hi,

    I use Websphere Portal Server 6.0 and I try to get the pumaUser from a filter (javax.servlet.Filter).
    Finally, It always return null value.

    Here my code :
    __________________________________________________ ________________________

    Context ctx = new InitialContext();

    Name myjndiname = new CompositeName(com.ibm.portal.um.PumaHome.JNDI_NAME );
    PumaHome pumaHome = (PumaHome) ctx.lookup(myjndiname);

    PumaLocator pumaLocator = pumaHome.getLocator(request);
    PumaController pumaController = pumaHome.getController(request);
    PumaProfile pumaProfile = pumaHome.getProfile(request);

    com.ibm.wps.puma.User pumaUser = (com.ibm.wps.puma.User) pumaProfile.getCurrentUser();

    ctx.close();

    __________________________________________________ _________________________

    I've already succeeded to get pumaUser in my theme (and in a portlet) with the same sample of code.
    Perhaps there is something special in a filter, or I do something wrong...

    Thanks by advance for any help or suggestion.

    Fabrice.


  2. Re: access to pumaUser from a filter

    On Jun 5, 9:32 am, wrote:
    > Hi,
    >
    > I use Websphere Portal Server 6.0 and I try to get the pumaUser from a filter (javax.servlet.Filter).
    > Finally, It always return null value.
    >
    > Here my code :
    > __________________________________________________ ________________________
    >
    > Context ctx = new InitialContext();
    >
    > Name myjndiname = new CompositeName(com.ibm.portal.um.PumaHome.JNDI_NAME );
    > PumaHome pumaHome = (PumaHome) ctx.lookup(myjndiname);
    >
    > PumaLocator pumaLocator = pumaHome.getLocator(request);
    > PumaController pumaController = pumaHome.getController(request);
    > PumaProfile pumaProfile = pumaHome.getProfile(request);
    >
    > com.ibm.wps.puma.User pumaUser = (com.ibm.wps.puma.User) pumaProfile.getCurrentUser();
    >
    > ctx.close();
    >

    > __________________________________________________ _________________________
    >
    > I've already succeeded to get pumaUser in my theme (and in a portlet) with the same sample of code.
    > Perhaps there is something special in a filter, or I do something wrong...
    >
    > Thanks by advance for any help or suggestion.
    >
    > Fabrice.


    I'm sory I don't have the answer for you but I was hoping you can help
    me. What should I import to use pumaUser, pumaHome etc...?


+ Reply to Thread