java web application connected users

Discussion in 'Java' started by Henry Cabot Enaus III, Apr 6, 2004.

  1. Hi all,
    how can I list all users logged in a web application?

    I have a web app running under tomcat,
    user log in with a basic authentication.

    I would like to write a servlet that show
    all the active connection and relative usernames.

    It's possible?

    thank you
     
    Henry Cabot Enaus III, Apr 6, 2004
    #1
    1. Advertising

  2. Henry Cabot Enaus III

    Enrique Guest

    (Henry Cabot Enaus III) wrote in message news:<>...
    > Hi all,
    > how can I list all users logged in a web application?
    >
    > I have a web app running under tomcat,
    > user log in with a basic authentication.
    >
    > I would like to write a servlet that show
    > all the active connection and relative usernames.
    >
    > It's possible?
    >
    > thank you


    Just a guess, but I think basic authentication is partially
    implemented by the operating system. So perhaps you could write
    software that will invoke system calls that return the number of
    active users.

    The challenge that I can see is that http session are basically
    anonymous, so I can't think of a way to associate a username with a
    particuar http session.

    I am curious to see if anyone elese can respond to your questions.
     
    Enrique, Apr 9, 2004
    #2
    1. Advertising

  3. I guess you right,
    now I'm trying to implements somenthing with HttpSessionListner,
    unfortunly this listener cannot be associated with "request" object ... :-(
    So I could count them but not get usernames.

    Another way is to implements HttpSessionBindingListener,
    I read something about it in java.sun forums,
    All I got is an error from tomcat 5 :-(
    a strange error, the manager deploy the web application
    but it could not start it the reason is "context previous error",
    or something like this...

    All I could wonder now is to redirect all the new session
    to a servlet that update a DB table... a great classic :)

    (Enrique) wrote in message news:<>...
    > (Henry Cabot Enaus III) wrote in message news:<>...
    > > Hi all,
    > > how can I list all users logged in a web application?
    > >
    > > I have a web app running under tomcat,
    > > user log in with a basic authentication.
    > >
    > > I would like to write a servlet that show
    > > all the active connection and relative usernames.
    > >
    > > It's possible?
    > >
    > > thank you

    >
    > Just a guess, but I think basic authentication is partially
    > implemented by the operating system. So perhaps you could write
    > software that will invoke system calls that return the number of
    > active users.
    >
    > The challenge that I can see is that http session are basically
    > anonymous, so I can't think of a way to associate a username with a
    > particuar http session.
    >
    > I am curious to see if anyone elese can respond to your questions.
     
    Henry Cabot Enaus III, Apr 9, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom Wild
    Replies:
    2
    Views:
    1,571
    vMike
    Aug 25, 2003
  2. Eka Gautama

    No of users connected..

    Eka Gautama, Feb 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    339
    Rajiv R
    Feb 19, 2004
  3. davout
    Replies:
    1
    Views:
    456
    Aquila Deus
    Apr 5, 2005
  4. Keithb
    Replies:
    4
    Views:
    455
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=
    Oct 10, 2006
  5. Raja
    Replies:
    2
    Views:
    308
Loading...

Share This Page