What is the last time a user logged in?

I want to create a portlet which shows the last time a user logged in (before the current session)
As PORTAL user using sql, I could query view orasso.wwsso_audit_log_view , but this view is not accessible for normal users in the portal. So I can't access this view in a dynamic page portlet.
What's the best way to retrieve this info?
Regards,
Ton

Ton,
create a PL/SQL function in the Portal schema that accepts username as a parameter and returns required data. Grant execute privilege on that function to PUBLIC or to a DB schema in which you are building your portlet.
Cheers

Similar Messages

  • Can I see when the last time a user logged was?

    Can I see when the last time a user logged was?
    Both in local directory and Open Directory

    I got the last ~10 logins on the computer, but not the last time a specific user was logged in.

  • What is the last time my account was acc

    I need help my laptop was stolen and I need to know if any one has been using my account in the last mounth I just got billed on my card for

    you may need to contact customer service, here's how
    http://community.skype.com/t5/General-Discussion/H​ow-to-Contact-Skype-Customer-Service/m-p/431911
    for the meantime, it may be also advisable to change your account password so no one can access your Skype account.
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
    SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
    | skypefordummies.blogspot.com | 

  • For the last time. What's wrong in these code ? please let your opnion.

    I can'nt get the data from the list in <c:forEach> tag, are you able to see the possible error?though the jsp page is returned, it is all in blank.
    the codes are these:
    -my conecction and where i get my list
    package teste;
    public class Data {
        Connection con;
        Detalhes detalhes;
        int codigo;
        ArrayList  list;
        public Data()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception(" Database not found!!" +
                    ex.getMessage());
        public void remove() {
            try {
                con.close();
            } catch (SQLException ex) {
                System.out.println(ex.getMessage());
        public void setCodigo(int codigo){
            this.codigo = codigo;
        public Detalhes getDetalhes(){
            try {
                String selectStatement = "select * from produto where codigo="+codigo;
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next())
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
                prepStmt.close();
            }catch(Exception e){
           return detalhes;
        public ArrayList getList(){
            try {
                list = new ArrayList();
                String selectStatement = "select * from produto";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next()){
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
                     list.add(detalhes);
                prepStmt.close();
                Collections.sort(list);
            }catch(Exception e){
                System.out.println(e.getMessage());
            return list;
    }    - the object where i store and show the data through the methods
    package teste;
    public class Detalhes {
        private String titulo;
        private String autor;
        private Double preco;
        private int codigo;
        public Detalhes(String titulo, String autor, Double preco, int codigo) {
            this.titulo = titulo;
            this.autor = autor;
            this.preco = preco;
            this.codigo = codigo;       
        public String getTitulo(){
            return titulo;
        public String getAutor(){
            return autor;
        public Double getPreco(){
            return preco;
        public int getCodigo(){
            return codigo;
    }-my inicial context class
    package teste;
    import javax.servlet.*;
    public final class ContextPage implements ServletContextListener {
        private ServletContext context = null;
        NewClass bookDB;
        public void contextInitialized(ServletContextEvent event) {
            context = event.getServletContext();
            try {
                bookDB = new NewClass();
                context.setAttribute("bookDB", bookDB);
            } catch (Exception ex) {
                System.out.println("Couldn't create bookstore database bean: " +
                    ex.getMessage());
        public void contextDestroyed(ServletContextEvent event) {
            context = event.getServletContext();
            NewClass dados = (NewClass) context.getAttribute("bookDB");
            if (dados != null) {
                dados.remove();
            context.removeAttribute("bookDB");              
    }- my jsp page
    <p><b><h1>Resultado:</h1></b></p><br>
    <jsp:useBean id="dataSource" class="teste.Data" scope="page" >
           <jsp:setProperty name="dataSource" property="codigo" value="${param.theCode}"/>          
    </jsp:useBean>
    <c:forEach var="book" items="${dataSource.list}">
        <p><b><h1><font color="red">${book.titulo}<h1></b></p>        
        <p><b><h1><font color="red">${book.autor}<h1></b></p>        
        <p><b><h1><font color="red">${book.preco}<h1></b></p>        
        <p><b><h1><font color="red">${book.codigo}<h1></b></p>        
    </c:forEach>
    <c:out value=${bookList}/>

    First of all: Don't try to force a response by using a subject "For the last time ..."
    Independent of your original problem
    There are a lot of things which are not correct in your code.
    // i would never use the user root to access a database :-(
    con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");
    public Detalhes getDetalhes(){
            PreparedStatement prepStmt = null;
            ResultSet rs = null;
            try {
                // use place holders when working with prepared statements
                //  String selectStatement = "select * from produto where codigo="+codigo;
                 String selectStatement = "select * from produto where codigo= ?" ;
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                prepStmt.setInt(1,codio);
                rs = prepStmt.executeQuery();
                while(rs.next())
                     // use colomn names rather than indices
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));
                rs.close();
                rs = null;
                prepStmt.close();
                prepStmt = null;
            // don't catch Exception
            }catch(SQLException sqle){
                // try and forget - is allways very useful
                Logger.getLogger(this.class.getName()).log(Level.SERVE, sqle.getMessage(), sqle);
            } finally {
               // close prepared statements and result sets within finally blocks
               if (rs != null) {
                  try {
                     rs.close();
                  } catch (SqlException sqle) {
                     Logger.getLogger(this.class.getName()).log(Level.FINEST , sqle.getMessage(), sqle) ;
               if (prepStmt != null) {
                  try {
                       prepStmt.close();
                  } catch (SQLException sqle) {
                      Logger.getLogger(this.class.getName()).log(Level.FINEST , sqle.getMessage(), sqle) ;
           return detalhes;
    public final class ContextPage implements ServletContextListener {
        // don't use a member field here the context is passed within the event.
        private ServletContext context = null;
        // makes no sense to save it as member field.
        // what's NewClass ?
        NewClass bookDB;
        public void contextInitialized(ServletContextEvent event) {
            context = event.getServletContext();
            try {
                bookDB = new NewClass();
                context.setAttribute("bookDB", bookDB);
            } catch (Exception ex) {
                System.out.println("Couldn't create bookstore database bean: " +
                    ex.getMessage());
        public void contextDestroyed(ServletContextEvent event) {
            context = event.getServletContext();
            NewClass dados = (NewClass) context.getAttribute("bookDB");
            if (dados != null) {
                dados.remove();
            context.removeAttribute("bookDB");              
    <%-- I don't see where a bean with id dataSource and scope page is set
             if the bean does not exist a new bean will be created
             nobody ever calls the remove method of your Data bean
             what's param.theCode ?
    --%>
    <jsp:useBean id="dataSource" class="teste.Data" scope="page" >
           <jsp:setProperty name="dataSource" property="codigo"
    value="${param.theCode}"/>          
    </jsp:useBean>
    }So now you've got a lot of work.
    If you have fixed all the problems I've told you and you have still problems you can come
    back and ask additional questions.
    andi

  • The last time you opened OpenOffice, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again? i have a problem with open office, if I press reopen, nothing happened  ans i see always this information on my mac? what ca

    The last time you opened OpenOffice, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again? i have a problem with open office, if I press reopen, nothing happened  ans i see always this information on my mac? what can I do?

    Please follow these directions to delete the Mail "sandbox" folders. In OS X 10.9 there are two sandboxes, while in 10.8 there is only one. If you're running a version older than 10.8, this comment isn't applicable.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Repeat with this line:
    ~/Library/Containers/com.apple.MailServiceAgent
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • We are a creative design studio, we need to use apple mac pro server , so we can make more than a different user to use at the same time doing different activities, on different screens, is it possible?what is the max. no. of users that can work efficient

    we are a creative design studio, we need to use apple mac pro server , so we can make more than a different user to use at the same time doing different activities, on different screens, is it possible?what is the max. no. of users that can work efficient.
    Appreciate your support and if possible , how to do this?

    If you want to work with Mac OS X, you need one computer per simultaneous user.
    What you are describing, " Multiple simultaneous logins to a single computer" is not avialable on a regular Mac of any description, unless you decide to use Unix tools instead of Mac OS X.
    Server will happily store files for many, many users and provide them to multiple (up to hundreds) of computers at "near hard Drive" speeds over Gigabit Ethernet. It can make the File Sharing part easy.

  • I can get the last time a patch was applied. What I need is this info for ALL servers.

    Getting the last time a server was patched is a simple, single line of PowerShell:
         get-hotfix -computername seadcweb10 | sort InstalledOn | select -last 1
    What I need is to get a list of *all* the servers in Active Directory, and get this information for each.
    I've tried variations of foreach , but I get errors.
    foreach ( $p in Get-ADComputer -Filter 'OperatingSystem -like "Windows *Server*"' ) { get-hotfix -computername $p.Name | select -last 1 }
    Get-HotFix : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    At line:1 char:97
    + foreach ( $p in Get-ADComputer -Filter 'OperatingSystem -like "Windows *Server*"' ) { get-hotfix <<<<  -computername
    $p.Name | select -last 1 }
        + CategoryInfo          : NotSpecified: (:) [Get-HotFix], COMException
        + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.PowerShell.Commands.GetHotFixCommand
    What am I doing wrong?

    Hi
    The RPC server is unavailable
    This error  comes when any server is not pingable.
    Make sure you are able to ping to all server from the server you are running the script.
    Then give a try to below script :
    foreach ( $p in Get-ADComputer -Filter {OperatingSystem -like "Windows *Server*"})
    get-hotfix -computername $p.Name | select -last 1
    MCITP - Exchange 2010 | MCITP - Windows Server 2008 R2

  • I wish I could remember what exactly happenned the last time I upgraded iphoto years ago, but something

    I wish I could remember what exactly happenned the last time I upgraded iPhoto years ago. Did my address book go kaflooey? But whateverit was, it discouraged me from any updating eversince.  Believe it or not, I have been limping along with Iphoto 6.0.6 and basically faring fine, given my needs.  But I would now like to be able to order prints from my photo library -- and you can't do that any longer with 6.  So my question is:  what are the things that
    can go wrong with the later systems?  And is there any way around having that happen?

    Make a back up.
    Make a second.
    Upgrade. Get on with your life.
    Regards
    TD

  • My question is to anyone that can help..I downloaded 2-300 photos on my iPad and want to reload a few hundred more. The last time I did this I lost the first batch of photos I loaded a week before. How do I just add without losing what is already on iPad?

    My question is to anyone that can help..I downloaded 2-300 photos on my iPad and want to reload a few hundred more. The last time I did this I lost the first batch of photos I loaded a week before. How do I just add without losing what is already on iPad?

    You need to add the new photos to the ones that are currently on the iPad and (re-)sync them all - only the most recent photo sync remains on the iPad, not including photos in a subsequent sync is how you delete them from the iPad (as you've found out).
    You can use third-party apps such as Simple Transfer which can copy photos to the Photos app via your wifi network, but they will only go into the Saved Photos/Camera Roll album, and not into a 'proper' album.

  • I had redeemed 2 $50.00 iTunes gift cards a few months ago. The last time that I checked my iTunes balance, it was $100.00. I logged in to iTunes yesterday and the $100.00 balance isn't showing up. Why would it be missing?

    I had redeemed 2 $50.00 iTunes gift cards a few months ago. The last time that I checked my iTunes balance, it was $100.00. I logged in to iTunes yesterday and the $100.00 balance isn't showing up. Why would it be missing? Would that happen if I changed my apple ID and password recently? Or would that happen if I de-authorized 2 devices? Would that happen if I deleted my music from my iPhone? Could someone hack into my iTunes account and take my money? Or maybe Apple charged me for something and debited my iTunes account? If you could please help me solve this mystery, I would greatly appreciate it

    Check your account's purchase history : See your purchase history in the iTunes Store - Apple Support
    If nothing shows then try logging out and back into your account on the computer/device that you are using.
    Neither updating your account id and/or password, nor deauthorising your account, nor deleting content from a device or computer's iTunes library will affect your balance

  • Hi, how to load mac without running windows (bootcamp)? The problem is this: the last time i ran the windows, but he hangs and died (can not run further  the logo). now i can not load not windows, not maс! how to be, what to do???

    The problem is this: the last time i ran the windows, but he hangs and died (can not run further  the logo). now i can not load not windows, not maс! how to be, what to do???

    can any body help me, plz!!

  • Used my girlfriends computer to start my iPad for the first time I was logged into my iTunes account.  Now her iTunes in the user on my iPad how do I change it to mine.

    Used my girlfriends computer to start my iPad for the first time.   I logged into my itunes account.  Now the iPad has her iTunes account on it.  How do I change it to mine.

    You can log out of her account by tapping on the id on the right-hand side of Settings > Store and you can then log in with your id - is that what you want to do ?

  • How to find the maximum no of users logged in Database

    Hi All,
    How to find the maximum number of users logged in database at particular time? I can find currently logged users or umber of sessions running on Database but I wanted to find at what time maximum number of users or sessions connected to the DB? is that possible? if yes please help me. thanks.

    Vijay wrote:
    Hi All,
    How to find the maximum number of users logged in database at particular time? I can find currently logged users or umber of sessions running on Database but I wanted to find at what time maximum number of users or sessions connected to the DB? is that possible? if yes please help me. thanks.
    select * from v$resource_limit;Lists about 20 different resources with current, maximum and limit on usage. Session count is one of them. I don't think there's any (simple, efficient) way to determine the maximum number of different users of sessions, though.
    Regards
    Jonathan Lewis

  • The last time you opened Sample_App, it unexpectedly quit while reopening windows. Do you want to reopen its windows again?

    Hi,
    When I run my Mac application, I get a error message saying "The last time you opened Sample_App, it unexpectedly quit while reopening windows. Do you want to reopen its windows again?".
    This message is not localized, i.e. this error message always display in English even when my system language is set to non-English language.
    I want to know if its a System throws error message? How can I localize this message?
    Your help/support will be highly appreciated. Thanks in advance.
    - Mayur

    Please follow these directions to delete the Mail "sandbox" folders. In OS X 10.9 there are two sandboxes, while in 10.8 there is only one. If you're running a version older than 10.8, this comment isn't applicable.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Repeat with this line:
    ~/Library/Containers/com.apple.MailServiceAgent
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • How could I re-open my mail box with error message :The last time you opened Mail, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again?

    How could I re-open my mail box, as an error message blocked "The last time you opened Mail, it unexpectedly quit while reopening windows. Do you want to try to reopen its windows again?" Even I entered re-open, the airbook does not response but prompt the same error message again.

    Please follow these directions to delete the Mail "sandbox" folders. In OS X 10.9 there are two sandboxes, while in 10.8 there is only one. If you're running a version older than 10.8, this comment isn't applicable.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Repeat with this line:
    ~/Library/Containers/com.apple.MailServiceAgent
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

Maybe you are looking for

  • Itunes doesn't play video

    Hello, I have had this problem for years, and it really stinks that I can't watch any of the stuff i've purchased on iTunes.  Any time I try and watch a video in iTunes (that i purchased through iTunes, it freezes and crashes iTunes.  If i try and wa

  • Can't open RAW files with new camera ?

    Hi I've bought a new camera, a Canon EOS 550D. I use Photoshop Elements 8 and suddenly cannot open RAW files as I did with my EOS 400D Help please? Thanks Eiona

  • Internet Settings

    I just bought a new imac (first one) 27" screen and I am wondering how to save screen size after exiting out? I sit a little ways back from my desk so i like to zoom the size of the web pages. After exiting and reopening safari, it goes back to the n

  • Any plans for Turbulence tool?

    Adobe has removed the Turbulence tool from the Liquify interface. I quite enjoyed playing with this tool and am wondering why the decision to pull it? Are there any plans to bring it back in the future?

  • UCCX 10.5 - IP Phone Agent (IPPA) & Finesse

    I see that running CAD or Finesse is mutually exclusive i.e. one or the other but I can't find anything about IP Phone agent. My question is, if I enable and run Finesse will IP Phone agent still work and be supported? Thanks