• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javascript to reach inside a servlet...

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I hope this question is not very much off topic... I have a button on my main page which is used for logging out (for time being all it does is confirm and close the browser..). What I would like to do is somehow through that function, access a static Vector of all logged in users I am keeping in a servlet, and remove that user... Two things I don't know here... How can I (can I???) grab the user's id from a cookie that is stored previously by a servlet onto the browser of the user, and secondly, how to remove an entry with that name from the Vector...
I know this can most probably not be done simply through the javascript, so I know I might have to submit a form and call a servlet to do the job... but I don't want to have a different page saying goodbye and all that... If you got any ideas how this can be done as quickly (and easily) as possible pls drop me a few lines... Thank you,
Regards,
Aris
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai!
U can maintain vactor of users in Servlet context(Add to vector whenever he logs in) and can delete when he logs out...
I think by this way u can handle logout tracking...
Rgds
Manohar
 
Aris Petridis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, but how do I do this thru a javascript function inside a jsp??
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have the javascript do a submit
reply
    Bookmark Topic Watch Topic
  • New Topic