keep track of logged-in users in a website
Hi guys,cud someone plz give me the source code in jsp to keep track of all the users who are downloading files from my website.I am working on building a website.I have provided provision for a user to register with the site by entering his email-id and password.Registered users are allowed to download certain catalogs.I want a code in JSP to keep track of the names of the users who download and the name of the catalog/file downloaded.I am using NetBeans5.0 IDE withPointBase database. Plz help me out.
Thanx in advance. :)
[537 byte] By [
Vinutha] at [2007-11-11 8:34:36]

# 1 Re: keep track of logged-in users in a website
do you already have the signin and authentification part?
usually in jsp you use the HttpSession class to store temporary information about what the user did. it's basically something like a extended (serverside) cookie.
on any action of a user, after login and authentication, you will have to store all that information into a database to have a persistent way to store your information.
# 2 Re: keep track of logged-in users in a website
Hi Graviton,
Thanx.Yes I do have the registration,Login and authentication part.
# 3 Re: keep track of logged-in users in a website
i guess the authentication is done against a database table. so you have a primary key (pk) for a user. now you could create another table, eg. user_downloads.
this should have a reference to the pk of the user and a textfield to store the information about which file was downloaded.
in the download jsp you now can insert a new record containing the download of the corresponding user.
# 4 Re: keep track of logged-in users in a website
Just to add to graviton, you can have the download automatic so it downloads when a user goes to the page and have the page do the database processing.
major at 2007-11-11 22:38:03 >
