Track currrent logged in user in jsf-adf

hi,
i need to track current logged-in user in my jsf-adf page. so that i can write their logout time back in db. i will update the table based on unique username.
kindly guide me.
Regards,
Edited by: user12217029 on Dec 14, 2009 9:59 PM
Edited by: user12217029 on Dec 14, 2009 10:39 PM

Hi,
We often use a userInfo managed bean with session scope that we initialize when the user logs-in. During the application it provides easy access to the userinfo, e.g. as an 'injected' property of another managed beans. On logout we can access this bean again (either by retrieving it from the session or as an injected property).
You could consider using a logging framework, e.g. log4j, with a JDBC Appender to write the data in the database. It's quite easy to filter only the logout messages.
Ciao
Aino

Similar Messages

  • Tracking and logging of user accounts

    how to do tracking and logging of user accounts... monitoring of user accounts... please help

    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/2d/b8be3befaefc75e10000000a114084/content.htm">ST03N</a>

  • How to log the user activity in JSF?

    How to log the user activity in JSF?
    e.g. the pages the user accessed
    searching criteria the user inputted...

    user080701 wrote:
    I need to write the info to database so that we can analyse which product most people seach for , etc.
    Can I write a filter to capture the request info and write the info to database?Of course. Although I would still advocate using logs. You can always parse them and put the data in a database after the fact.

  • Dynamic User Authentication in JSF, ADF BC Application

    I have developed a JSF, ADF BC Application using JDeveloper 10.1.3.3. My application consists of jspx pages and I also have to integrate some existing oracle forms with it using OraFormsFaces library.
    I have successfully used custom DBProcLogin Module by Frank to authenticate the users with the help of a stored procedure and user credentials stored in database tables.
    During integrating Oracle Forms I realised that some of these oracle forms use get_application_property(username) to retreive connected user information. All of the users which are stored in database tables are also oracle users with the same credentials as stored in database tables. The existing oracle forms based application was connecting to Oracle every time with different provided user credentials each time and therefore returning correct (required) user name information.
    Now since I have used DBProcLogin Module in new ADF application, when I run it, user is successfully authenticated but get_application_property(username) in the existing oracle forms returns the user name that application module is using to connect with the database. To make it work correctly, I want my ADF application to connect to oracle database with different user each time.
    I have searched and seen topics such as, Dynamic JDBC Credentials, Database Proxy Users etc. But I am confused with the width and depth of this much information available. Therefore, I thought I may get some advice from the experts present in the forum that which of the techniques will go best with my application.
    Keeping in view the scenario that I have provided, can someone please guide me to the best suitable technique and the related information/documentation?
    Thanks in advance,
    Amir

    Hi,
    the whitepaper you reference is written by the expert on this subject. Samples are posted by the same author: http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    Note that what you try to do will create a dedicated connection for Forms and ADF, which means that 100 users will have 200 database connections open.
    Frank

  • Problems while deploying a JSF/ ADF Faces App to Apps Server 10.1.3.0.1

    Dear All,
    I built a JSF based application (Using ADF Faces Components) developed in JDeveloper 10.1.3.1.0 (Application Configuration: [JSF, ADF BC]. The application is running fine with the embedded OC4J intance (automatically aunch by JDeveloper).
    I am now trying to deploy it on the installed Oracle Application Server (running on the same local machine). The details of the versioning for different components in this App server are as follows:
    1. OracleAS J2EE 10.1.3.0.0
    2. Oracle ADF 10.1.3.1.0
    The deployment steps I followed (as given in Chapter 34 of 'Oracle ADF - Developer's Guide for Forms/4GL Developers') seems to be running smoothly. This is because the deploy process ends up showing no erros in the message window.
    However when I tried to test the application with a browser using the Apps Server URL (HTTP://localhost:8888/<my-app>/<firstfile.jspx>), I am finding 'Page not found error'.
    I also tried a manual deployment (using deploy to a WAR file then copy the resulting war & ear files and the xml descriptor file to the Apps server's http root) and gives the war file URL in the browser.
    In this case now I am getting the following error page:
    =====================================================
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource
    'http://localhost:8888/HousingWithADF.war'.
    =====================================================
    Any idea?
    Regards,
    Irfan Ilyas
    PS: I am doubtful about creation of Deployment Descriptors step as the documentation is not very clear about exactly which descriptors we need to create. Using my own idea, I tried to create J2EE descriptor, and one tld (taglibrary) file. However, the manual war deployment generates only the tld file in the deploy folder.

    Thanks for the hint.
    OBSERVATION #1:
    After looking through the administration console for OC4J instance, I found my application name with UP status. When drill-down further, the console gives me the URL which can be used to test the application.
    While using the URL, a different error message was found:
    URL: http://localhost:8888/KFUPMHousing/
    Error:
    ====================
    HTTP 403:(Forbidden)
    ================
    You are not authorized to view this page
    You might not have permission to view this directory or page using the credentials you supplied.
    From my experience of Microsoft IIS, I know here I may need to configure the folder permissions for a web-user. But exactly which user and where it is defined (at OS Level or in AS), I am not much sure.
    Can you elaborate?
    OBSERVATION #2:
    The log text for my application shows the following error (for the attempt I did with the URL shown above)
    Log Text
    07/01/05 22:43:38.62 HousingWithADF: JspServlet: unable to dispatch to requested page: Exception:java.io.FileNotFoundException: C
    :\product\10.1.3.1\OracleAS_1\j2ee\home\applications\HousingWithADF\HousingWithADF\HosReqInfo.jspx (The system cannot find the file specified)
    However, I can browse the file on my local disk in the path specified with a little change in the path. The file is found in 'pages' folder within the last folder,named HousingWIthADF. I tried to move the file in the exact path specified in the log and now finding the 'Page not found' error.
    Any idea?
    Irfan Ilyas

  • JSF/ADF How to throw UI failure on SQLException?

    I have a button bound to the persistEntity action for a form listed on my page, but there can't be any mistake on whether this get's inserted in the database as it's part of a workflow. Failure was occurring and after checking the logs I found a SQLException for inserting a null value.
    While this is cleared up by more exact control of required fields, I would like to know if there is a way that I can set the persistEntity to cause a noticeable or blocking UI action so that users can't proceed with a workflow when there is an error in the SQL execution.
    Many thanks,
    Raymond

    Oop, sorry. Thanks for the redirect.
    -Raymond
    This post has been made at the following link: JSF/ADF How to throw UI failure on SQLException?

  • Multiple simutaneously logged in users accessing AFP home directories?

    Hi,
    Many of our problems are described in this guy's blog:
    http://alblue.blogspot.com/2006/08/rantmac-migrating-from-afp-to-nfs.html
    The basic capability we want is to have multiple simultaneously logged in users to have access to their AFP mounted home directory, which is configured in a sane, out-of-the box setup using WGM and Server Admin.
    Multiple user access could take the form of FUS (fast user switching), or simply allowing a user to SSH into a machine that another user is already logged into and expect to be able to manipulate the contents of her home directory.
    From my extensive searches, I have no reason to believe this is currently possible with 10.4 Server and AFP.
    (here's the official word from apple: http://docs.info.apple.com/article.html?artnum=25581)
    I've read that using NFS home directories will work, though.
    I want to believe that Apple has a solution for this by now (it's been almost a year since we first had difficulty), or at least a sanctioned workaround. If Apple doesn't have one, maybe someone else has come up with something clever. I find it hard to believe that more people haven't wanted this capability! (not being able to easily search the discussion boards doesn't help, though...)
    Thanks for your help!
    Adam

    Parallels Issue. Track at http://forum.parallels.com/showthread.php?p=135585

  • Getting Logged on User'Information in an Oracle-Form SSO Partner Application

    Hi.
    I could run Flight-of Fancy Application and capture user's information by calling the
    "Parse_cookie " Procedure.(use the Scenario 2 - Access the Portal and then the FOF App)
    and defined an Oracle-Form application as Partner application like FOF.
    I want to have Logged on user'Information in the "Oracle-Form" . But the Fucntion owa_cookie.get dosen't work correctly.please let me know what can I do ?
    Thanks in advanced.

    Hi.
    I could run Flight-of Fancy Application and capture user's information by calling the
    "Parse_cookie " Procedure.(use the Scenario 2 - Access the Portal and then the FOF App)
    and defined an Oracle-Form application as Partner application like FOF.
    I want to have Logged on user'Information in the "Oracle-Form" . But the Fucntion owa_cookie.get dosen't work correctly.please let me know what can I do ?
    Thanks in advanced. If you're writing your own partner application, then you are correct to get the user information from the output variables
    from the parse_url_cookie procedure. You should then set the information you want to keep track of in the cookie, or combination
    of cookie and persistent storage in the database. Take care of the security implications while doing this.
    On subsequent calls to your application, the user info should be obtained from the cookie and the database, if you
    are using a combination of the cookie and database storage to keep your info.
    The owa_cookie.get routine is used to read the cookie, which is generated with owa_cookie.send.
    These routines work fine, when invoked correctly.
    If you are having trouble with them, you're probably not using the calls properly.
    The following code provides an example of how to use the owa_cookie calls...
    create or replace package testcookie
    is
        procedure show (p_name IN VARCHAR2);
        procedure send
            p_name    IN VARCHAR2,
            p_value   IN VARCHAR2,
            p_path    IN VARCHAR2 default null,
            p_expires IN VARCHAR2 default null
    end testcookie;
    show error package testcookie
    create or replace package body testcookie is
        procedure show (p_name IN VARCHAR2) is
            v_cookie owa_cookie.cookie;
        begin
            v_cookie := owa_cookie.get(upper(p_name));
            htp.htmlopen;
            htp.bodyopen;
            htp.print(v_cookie.vals(1));
            htp.bodyclose;
            htp.htmlclose;
        exception
            when others then
                htp.htmlopen;
                htp.bodyopen;
                htp.print('NO COOKIE FOUND.');
                htp.print(SQLERRM);
                htp.bodyclose;
                htp.htmlclose;
        end;
        procedure send
            p_name    IN VARCHAR2,
            p_value   IN VARCHAR2,
            p_path    IN VARCHAR2 default null,
            p_expires IN VARCHAR2 default null
        is
            v_cookie owa_cookie.cookie;
            l_agent varchar2(30);
            l_expires varchar2(30);
            l_path varchar2(100);
        begin
            if p_expires is null then
                l_expires := null;
            else
               l_expires := to_date(p_expires, 'MMDDYYYY');
            end if;
            if p_path = 'ALL' then
                l_path := '/';
            else
                l_path := null;
            end if;
            owa_util.mime_header('text/html', FALSE);
            l_agent := owa_util.get_owa_service_path;
            l_agent := substr(l_agent, 1, length(l_agent) - 1 ) ;
            owa_cookie.send(
                name    => upper(p_name),
                value   => p_value,
                expires => l_expires,
                path    => l_path
            owa_util.http_header_close;
            htp.htmlopen;
            htp.headopen;
            htp.headclose;
            htp.bodyopen;
            htp.print ('Cookie set.');
            htp.bodyclose;
            htp.htmlclose;
        end;
    end testcookie;
    show error package body testcookie;
    grant execute on testcookie to public;If you load this into a schema which a DAD can access, then you can invoke the show and send procedures to view and
    generate cookies.
    To generate a cookie, issue the following from your browser ...
    http://server.domain.com/pls/dad/schema.testcookies.send?p_name=test&p_value=hello
    To view the cookie:
    http://server.domain.com/pls/dad/schema.testcookies.show?p_name=test

  • Moving/Linking Claims Windows Auth user to an ADFS Claims

    Hi guys, 
    Here is my situation:
    Initial deployment: SharePoint 2010 with Windows Authentication - Users login using AD
    We successfully migrated the web application to use "Claims"
    We then integrated the web application with ADFS 2.0 - Using the same AD users
    Everything seems good and working fine. 
    The question I have is related to content already created in SharePoint. Is it possible to map the new ADFS account usernames to the existing windows authentication claims usernames?
    This is important for users, because we would like the "My" views of lists and libraries to work. SharePoint at the moment thinks that the logged in users (using ADFS) is different than the user who created/modified the documents. (Although it
    is the same AD account)

    Hi Inderjeet
    Thanks for your reply. The article did help in moving users (Move-SPUser) from AD to ADFS (Which I noticed in the securities in groups), however, the issue I'm looking for is still standing where the items that were created by the user using "Windows
    Auth Claim" were not moved/updated to the "ADFS Claim" user, which in fact they map to the same AD user.
    Is there away to transfer/update the created by and modified by attributes of users from Windows Claims to ADFS Claims user?
    UPDATE: The above statement is not correct. Move-SPUser actually updates the created by and modified by attributes to. 

  • Manual report( to track recent login with user id)

    Hello,
    I want a report where I should be able to track the users id and their recent login/out to BPC Server (via any module Admin, Excel, Web). I am in BPC 5.1 
    I know this can be tracked via who is online in BPC Admin but the list is showing the name of the users who have logged in through BPC Admin but not via Excel, web.
    I want to create a report  manually to track the list of users who have last logged in to BPC via any form. How can we create this as report manually? Do we have any EV functions to do this? Please let me know how we can do this.
    Thanks
    Vijay Venkatesh

    Hi Vijay,
    Restricting the entry to BPC excel or Web through only Admin is not feasible. The context from where I am coming is, accessibility to excel directly comes in with the installation of BPC Office. So, this means that if BPC Office is installed, the client will have the access to enter BPC for Excel directly. Feasibility of restricting the direct entry is not possible.
    The user activities are stored in one of the tables in SQL, from where BPC Admin gets the detail about which user has logged in to the system. If you can create a reprot to fetch the details from that table, then it might be feasible to get the data in excel. However, this needs to be done outside BPC scope, since, BPC doesnt have any function to fetch these kind of results. The creation of this kind of custom report can be very complicated. However, I am not completely sure whether this is feasible or not.
    Alternately, You can try with Audit Activity Report also. This will give you some amount of information about user activities.
    Hope this helps.
    Edited by: nilanjan chatterjee on Oct 23, 2009 3:00 PM

  • How to get the logged in userId value in adf task flow OIM11g R2

    Hi,
    I have created an adf task flow. Now I want to run some query in that based on the logged in userId.
    Could you please help me in knowing how to get the logged in userID value in adf TaskFlow so that I can run a parameterized query.
    Thanks

    3 different ways to retrieve the username (not sure what you mean by user ID) :
    http://mahmoudoracle.blogspot.be/2012/06/adf-get-current-logged-user-name.html#.USI_c-h8zIo
    Also provide your JDev version.
    Basicly, you should use the groovy expression in a view criteria (it's the fastest and easiest way) and call that view criteria whenever you need it.
    That's if you are using ADF BC of course.

  • How to get the logged in userId value in adf task flow

    Hi,
    I have created an adf task flow and deployed the same in application as an adf library.
    Now I need to get the Logged in User ID value in the adf task flow which I created.
    Based on this userid I need to run query to fetch the data related to the user from the database.
    Please help/guide me to solve this issue.

    3 different ways to retrieve the username (not sure what you mean by user ID) :
    http://mahmoudoracle.blogspot.be/2012/06/adf-get-current-logged-user-name.html#.USI_c-h8zIo
    Also provide your JDev version.
    Basicly, you should use the groovy expression in a view criteria (it's the fastest and easiest way) and call that view criteria whenever you need it.
    That's if you are using ADF BC of course.

  • Reflecting the value of the logged in user in an af:inputText Column

    Hi
    I have a Af:table with multiple Rows. In one of my Af:columns I want to reflect the logged in user and store this value when I commit the page.
    I am using JAZN security. Please Help.

    Please follow the guidelines available at the top of this forum when posting. As such give us more details about what version of JDeveloper you're using, and which technologies including the model layer like ADF BC you're using.
    If you're using ADF BC, at the EO attribute level there are history properties for defaulting an attribute's value to that of the JAZN user. This is an ideal location to set this if you're using ADF BC. But as you haven't included any information about what model layer technology you're using it is hard to help you further.
    CM.

  • Tracking change log by workstation ID along with username

    Hi All users,
    I am using SAP business one 8.8 and want to track changes in the system in such a way that along with user name I want to know, from which workstation (or PC) the user has made changes or created any document? Every PC has its unique IP or ID, can I see this in change log in any way? that from which workstation or client PC, the user has made changes?
    Any help is highly appreciated.
    Thanks in advance,
    Farhan Sufi

    Dear Gordon,
    Thanks for your reply, Actually I need only workstation ID along with user name when tracking transaction log from the tools option "change log".
    I am calling it workstation ID, but you can tell me about any thing from which I can track, from which client or PC the user made any transaction. Whether It gives me computer IP or computer name or any identity of PC by which I can know which PC (among server and clients) is used by user to make any transaction.
    Any help is appreciated
    Thanks,
    Farhan

  • User Authentication in ADF BC

    Hi,
    I am trying to understand "how to authenticate the database(or application) user and retain the connection for later pages in ADF BC application".
    I downloaded the famous SRDEMO from oracle and now working on it.
    As I understand :
    It runs the index.jspx page which just has the following code :
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
    <jsp:scriptlet>
    response.sendRedirect("faces/app/SRWelcome.jspx");
    </jsp:scriptlet>
    </jsp:root>
    it calls the SRWelcome.jspx but when I see the SRWelcome.jspx I do not see the actual code as I see when I run the application.I do not find any include file statement which ask for username and password.
    Questions :
    1. How SRDEMO calls the login page which asks the username and password and later use it in other pages?
    2. Is there exists any document which describe How user connection(userid and password) information is authenticated and preserve later in other pages of the ADF applicaton?
    3. Is there exists any example which does the database user authentication instead of application user authentication in ADF BC and used in later forms?
    4. Is there exists some pre-login( on-logon) triggers kind of stuff in ADF as it was in forms?
    PS: I don't have experienced in ADF but in Oracle Forms so looking for the same kind of simple authentication functionality in ADF.
    Best Regards
    Anurag Vidyarthi

    Hi,
    How SRDEMO calls the login page which asks the username and password and later use it in other pages?
    Its using container managed security: Look at infrastructure/SRLogin.jspx
    Is there exists any document which describe How user connection(userid and password) information is authenticated and preserve later in other pages of the ADF applicaton?
    In container managed authentication, the username can be accessed from the JSf external context. The password isn't
    Is there exists any example which does the database user authentication instead of application user authentication in ADF BC and used in later forms?
    Yes, you can configure container managed authentication to use a custom JAAS LoginModule instead
    http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm
    Is there exists some pre-login( on-logon) triggers kind of stuff in ADF as it was in forms?
    Using ADF Business Components that would be the prepareSession() method that is called on the application module
    Frank

Maybe you are looking for

  • Slide order in the timeline

    I have been shown how to do a very specific task in Flash Pro CS5. I have five slides in my timeline, with buttons that include links to product pages on our website. These five slides comprise a movie, with each slide being displayed for a few secon

  • I need to create an image gallery

    I'm looking for a tutorial which explains me how to create a simple AS3 image gallery driven by an XML file. The gallery I need is really simple: - an horizontal bar placed on the bottom containing the thumbnails which scrolls left and right accordin

  • How to download item from computer to ipodtouch?

    don't what happen to itunes???

  • External Editor only TIFF and PSD

    I want to edit my photos in Photoshop but in the Preferences there are only the TIFF's and PSD formats supported - since my original files come as JPEG's it would be sufficient to safe the files as high quality JPEG's. Is there a possibility to edit

  • File icons missing/slow to load in Finder

    I've noticed this on both of my Macs running 10.10.2. Quite frequently, the usual icons next to files are initially missing and sometimes will eventually load. This is true for zip files, mp3 files, and application files specific to a certain app but