• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

How to delete a session by knowing the session id

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First user login in my site with

User name--Rajesh

Password---password at 10.15 am and he is doing some task in my site



After some time some another user login with

User name--Rajesh

Password---password at 10.30 am



At that time I want to remove first person's session how to I remove it (for example yahoo chat)



how to find session all session id id's at a particular time

how to delete a session by knowing the session id.
 
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to invalidate session.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sitaram,
Preventing multiple logins with the same user/id was discussed in great detail a month or two back on this or the JSP forum.
If you're really interested in the topic, it's worth spending some time with the search feature on this site to look that tread up.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

how to find session all session id id's at a particular time
how to delete a session by knowing the session id.


As I recall, the early version of the servlet API let you do this sort of thing but the methods were considered a security risk and were removed.
The simplest thing to do is to make a plain old java object (POJO) that holds a user's information and manage those separately from the HttpSession mechanism. For example, in a collection keyed by user name.
Bill
reply
    Bookmark Topic Watch Topic
  • New Topic