| | |
login help plz
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2009
Posts: 26
Reputation:
Solved Threads: 1
hi helper,
i'm trying userlogin web app....where logged in user ID's are sent to a hash map .....so that admin can view logged in users list...
my problem is... hash map is creating new map (which replaces the old map) when ever a user logs in.... so admin is able to view only last logged in user.........
is it possible to do with out a db.....? i think it is...
it will be so confusing 4 u if i put my code here....
plz gimme an idea of how to implement that (in detail if possible)
thanks in advance
BeanBoy
i'm trying userlogin web app....where logged in user ID's are sent to a hash map .....so that admin can view logged in users list...
my problem is... hash map is creating new map (which replaces the old map) when ever a user logs in.... so admin is able to view only last logged in user.........
is it possible to do with out a db.....? i think it is...
it will be so confusing 4 u if i put my code here....
plz gimme an idea of how to implement that (in detail if possible)
thanks in advance
BeanBoy
Although you have mentioned that you are working on a web application, you have not even given us the slightest hint as to what are you using in that web application, is it JSP, Servlets etc.
Yes its perfectly possible, although restricted to the list of users logged in since the last time your web application was reloaded or your web server restarted, if you want it to persist even across that, then its got to be a DB or a File to store that info.
In the former if using a JSP,you want your HashMap object to be visible across multiple sessions it will have to be in the "Application" scope.
Alternatively if you are using servlets, you could have your HashMap initialised in the
•
•
•
•
is it possible to do with out a db.....? i think it is...
In the former if using a JSP,you want your HashMap object to be visible across multiple sessions it will have to be in the "Application" scope.
Alternatively if you are using servlets, you could have your HashMap initialised in the
init() method of your Servlet, and then just keep adding the list of Users logging in, in your corresponding service() or doGet() or doPost() method whichever you are using. Last edited by stephen84s; Aug 20th, 2009 at 3:50 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
![]() |
Similar Threads
- Complete Flash Chat Website For Sale (Websites for Sale)
- post (PHP)
- Login page keeps repeating (Web Browsers)
- Login failed (ASP)
- plz help--its urgent (Java)
- login code in C#(its urgent) (C#)
- Login Problems with Hotmail (Web Browsers)
- login tutorials ? (ASP)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
Other Threads in the Java Forum
- Previous Thread: how to delete the previous contents in the file
- Next Thread: silly doubt
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth businessintelligence chat class classes client code component database desktop draw ebook eclipse encode equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop mac main map method methods mobile netbeans newbie number online open-source oracle parameter print problem program programming project properties recursion reference replaysolutions rotatetext scanner score screen scrollbar server set size sms socket sort sql string superclass swing template test threads time tree windows working xstream






