Results 1 to 6 of 6
  1. #1
    mrvigneshmca is offline Member
    Join Date
    Mar 2009
    Posts
    12
    Rep Power
    0

    Default Urgent help regarding session

    hi friends,
    I am presently doing a project on web based criminal database system which requires maintenance of users(police officer) session i.e. admin should have the facility of viewing all the actions done by user like no. of database entries done by user and etc. I know we ve session.getAttribute and setAttribute concept is used for storing an attribute while moving between different pages. Do i ve to use the same for my problem also or ve a better solutions. Please help me to proceed further in my project. Advance thanks for precise reply

  2. #2
    Tirka is offline Member
    Join Date
    Feb 2009
    Posts
    12
    Rep Power
    0

    Default

    hi mrvigneshmca,
    from ur query, i'm able to assume(i'm not quite clear) that u want 2 maintain & get info of the the session_id s for users when they are logged in. for that:
    in ur login page u use session.getId() and it creates session_id for each login and u can keep that id in a session related table(in the database) as long as the session is active(until logged out). And u use session.Invalidate() for the loggin out operation(which clears the session_id for that session from the
    table).Now u can develop a page that would use the info from the session table and give the results accordingly.
    Hope this helps.

  3. #3
    mrvigneshmca is offline Member
    Join Date
    Mar 2009
    Posts
    12
    Rep Power
    0

    Default

    hi tirka,
    thanks for ur reply.ya I too tried this getId() concept but i am presently developing my jsp page only and not explored into the servlets concept. Will getId() u proposed work on jsp pages. Also one more doubt s tat can v able to list the entries the user has done in database in webpage if can u guide me the way pls

  4. #4
    Tirka is offline Member
    Join Date
    Feb 2009
    Posts
    12
    Rep Power
    0

    Default

    certainly it'll work on jsp pages
    and what kindda "entries" are u referrin' to..
    plz specify...

  5. #5
    mrvigneshmca is offline Member
    Join Date
    Mar 2009
    Posts
    12
    Rep Power
    0

    Default

    hi tirka,
    I mean tat i want to view all the the profiles(all details) user has uploaded in profileentry table which i ve created. How as a admin i could retrieve the particular users work of profile entry in jsp page hope u could understatnd me now

  6. #6
    Aseem is offline Senior Member
    Join Date
    Mar 2009
    Location
    USA
    Posts
    127
    Rep Power
    0

    Default

    if you want to see then uploaded entries in db then u dont need session. after u get connected to database u can write a query identified by some key e.g select * from profileentry where id = xxx;
    in jsp page ;
    out.println("id :"+rs.get(1)+ "name:"+rs.get(2));
    here rs is a resultset object.

Similar Threads

  1. Replies: 1
    Last Post: 04-22-2009, 12:20 AM
  2. session
    By jhen in forum Java Servlet
    Replies: 5
    Last Post: 03-16-2009, 05:44 PM
  3. Replies: 2
    Last Post: 12-23-2008, 07:35 PM
  4. session
    By jm_it04 in forum AWT / Swing
    Replies: 0
    Last Post: 03-04-2008, 12:32 PM
  5. Use session
    By Eric in forum Java Servlet
    Replies: 1
    Last Post: 07-05-2007, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •