Steve Su

Greenhorn
+ Follow
since Oct 16, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Su

The correct path should have been "/home/MyUserName/www/MyLogName.log".
BTW, thanks for the reply Ko Ko.
14 years ago
For those who deployed DbConnectionBroker and got it to work, what should be the path to my log file be if I named it "mysql.log" and placed it in my default web folder (which is the folder that holds my entire site). I have tried "http://www.MyWebSite.com/mysql.log" but it didn't work. This happened when I deployed my site onto my web-host.
Locally, I just use "c:\mysql.log" and it works fine.
14 years ago

Originally posted by Sainudheen Mydeen:
I think Steve wants to invalidate one session out of 5 active sessions present in the container through a seperate JSP program which is monitoring the active sessions. Is that possible with session.invalidate() ?
-Sainudheen


Yes, that is what I want to do, which I don't think session.invalidate() would work in this case. My purpose of doing this is to track down somebody who logged in, made change #1 to his cart, closes the browser without logging out, logs back in before his first session times out, makes change #2 to his cart, and this time logs out properly using the logout button (this is the only place where I am able to invalidate the user). I use HttpSessionBindingListener to update my DB (user's cart) when the user logs off. The problem with the above scenario is that change #2 will go into effect immediately, and then change #1 will go into effect when the user's first session ends (~30 min. later), which is the reverse of the user's intention (change #2 to be the final change). My solution around this was to track all of the users who currently has an active session. Once I caught a user trying to log in again before his first session ends, I will help end his first session (which will make the user's change #1 go into effect right away) and allow him to start a new session. The problems comes with trying to end a specific session out of a list of active sessions.
I could have accomplish the task if I was able to capture of closing of the browser event, but apparently after searching through JavaRanch and else where the propose methods do not work. For instance, onBeforeUnload would not work because in addition to closing the browser, refreshing the browser or leaving the browser would also trigger the onBeforeUnload event.
Sorry for being so lengthy!
Any suggestions?
14 years ago
I have a JSP page that tracks all of the current sessions for administration purposes. Lets say that I currently see 5 active sessions (5 users on my website). Session #1 has sessionID: aki31Y5Uy45d. I want to know how can I manually end session #1.
I tried application.removeAttribute("aki31Y5Uy45d") but it did not work.
[ October 16, 2003: Message edited by: Steve Su ]
14 years ago