The same user can only login once

Hello,
I have a problem with my system. I made a system where you must login.
I use the following code:
boolean login = false;
String username= request.getParameter("username");
String password= request.getParameter("password");
User user= Usermutations.makeviaUsername(username);
if (user.getPassword().equals(password) && !password.equals("")) login= true;
if (login) ReqD = getServletContext().getRequestDispatcher("/Overview.jsp");
else ReqD = getServletContext().getRequestDispatcher("/False.jsp");
request.getSession().setAttribute("user",user);
request.getSession().setAttribute("username",username);
request.getSession().setAttribute("password",password);
if (ReqD != null) ReqD.forward(request,response);
//Clean up resources
public void destroy()
Now I want that the same user can only login once. So when a user login with his username and password, no one else can login with that user name and password.
I don't wan't to put the username in the database and then validate if the user is already logged in, because then the user must logout and not close the webbrowser else the user stays in the system.
Does anyone knows a solution top this problem.
Thanks in advance,
Henk

So I wan't the database and when the user is logged in
the name is set in the database. But when the user
clicks on the X (close button in the browser his
username must be deleted from the database)You can't tell when the user does that (or perhaps you can sometimes, with difficulty). But even if you could it doesn't solve your problem. Many people keep their browsers open all day, and -- you may find this shocking -- they go to sites other than yours.
So basically, if you don't provide them with a logout button you can't tell when they "leave" your site. And even if you do provide them with a logout button, they won't necessarily bother to use it. So you're left with waiting until the session expires, and then logging them out. This also means that if they come back to your site while the session is still active, then they are still logged in. This is not an error and you should not treat it as one.
PC²

Similar Messages

  • Multiple MIDI takes on the same track - can only find one in the editor?

    After making several passes on an instrument track w/drum sampler on it I opened the piano roll editor to edit the data only to find only one of the passes represented there. I could only find the other passes when I moved the current one out of the track temporarily. There must be a better way to do this, can anyone hip me to the right way to edit all the data in the multiple passes at the same time? I can hear all the data, I just can't see all of it.
    I'm doing this so I only have to instantiate the Virtual Instrument once in the session, CPU is always at a premium these days. I have done the bulk of my work in recent years in ProTools but I have found Logic Express 8 to be far more efficient with CPU load on my core 2 duo Macbook. I suspect I'm just missing something but I cannot seem to figure it out. Help?

    I appreciate your comments but my issue was in editing the already recorded tracks. If you can find in those pages where it shows how to view all the data from the already recorded multiple MIDI tracks at the same time in the piano roll window and be able to edit them I'd be much obliged if you would point those out to me. I double checked your recommendation after reading your first reply, the answer I needed was not there.
    Evidently you can only select and view one region at a time no matter how many there are in the same track. I have searched the LE 8 pdf manual and also searched thru an Apple Logic Pro Training series book for version 7 JIC it had some additional insight into this particular issue and came up empty, that's why I was asking for additional insight on this panel. I always go to the documentation first - RTFM is first call for me.
    I've already figured the workaround and I'll know better next time to allow Logic to create its own multiple take folders so as far as I'm concerned this case is closed. Thank you again for your input.

  • The 'DbProviderFactories' section can only appear once per config file. (System.Configuration)

    Hi I have installed just the enterprise manager, and client connectivity tools on my workstation. When I try to do something in Enterprise manager like create a new view I get the error in the Title line. I have checked and double checked the section mentioned
    in the machine.config files in the .NET framework config folder for version 2 and 4 both 32 and 64 bit and can find no "doubled section" further more I have compared the files to machines that are working correctly and the sections are the same.
    I have uninstalled and reinstalled with no luck, same error. I also get the same error if I try to use the SQL tools within visual studio. I need to get this fixed. None of my searches have turned up anything except the machine.config file.
    Note I also have SQL 2005 tools installed on this machine as well as SQL 2008 Express.
    Lee

    Hello,
    Have you examined the Machine.Config for all .NET Framework folders?
    C:\Windows\Microsoft.NET\Framework\XXXXXX\Config
    Where XXXXXX is a different .NET Framework version.
    Remove any empty entry for DbProviderFactories.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • A particular network user can't login to a mac in a classrom but other network users can. Then the network user can login to other identical macs in same classroom. Anyone seen this before?

    A particular network user can't login to a mac in a classrom but other network users can. Then the network user can login to other identical macs in same classroom. Anyone seen this before? It has happen twice. Two different teachers in two different classrooms entering the correct user name and passwords and computer won't allow them to login. Then they try in different computers in same classroom and have no problem login.

    Yes. I can login with a test user. And any other network user can login as well to this particular mac. Actually the mac has bootcamp and boots into either mac or windows. The same user entering the same login username and password can login into the windows side, but not the mac side.
    I had this same issue last semester in another classroom, another mac and a different teacher. This summer I reformatted and imaged that mac and I asked that teacher to login today to that reimagened mac and she had no problem today doing so.

  • How open multiple responsibilities in the same user login session in R12 ?

    Dear All,
    Can anyone help me to know how to open multiple responsibility in the same user login session in R12 ?
    Thanks..
    Edited by: G-oracle on Sep 18, 2011 11:22 AM

    Can anyone help me to know how to open multiple responsibility in the same user login session in R12 ?What do you mean by open multiple responsibilities in the same session? You can only see the menu of one responsibility at a time, so how to do you expect the application to let you see multiple responsibilities/menus in one session?
    You could open another session and this way you can access more than one responsibility at the same time.
    Thanks,
    Hussein

  • Block simultaneous logins by the same user on wired 802.1x

    Is it possible to block simultaneous logins by the same user, meaning is userX login on port gi1/0/1 and after that the same user (UserX) is trying to login on a different port, it will be blocked.

    Sorry I did not read your original question correctly. So at the moment, you can only restrict the number of concurrent connections for users that are only going through the web authentication process. If you are using EAP-TLS, PEAP, etc, then there is no method to restrict those users from performing multiple authentications on the network.
    Thank you for rating helpful posts!

  • Can Mac OS 10.8.3 and 10.6.8 share the same User/Home folder?

    I use both OS 10.6.8 on HD and 10.8.3 (on a SSD). Most of my User data is on the 10.6.8 drives.
    Presently I manually save data when using 10.8.3 to the 10.6.8 User folder. I know I can select Advanced Options in System Prefs in my Accounts folder to make the 10.6.8 User folder the User folder that 10.8.3 uses.
    If I do that can I alternate booting from one OS to the other using the same User folder? Or is there a problem with both OS's writing stuff to the
    ~/Home/Library folder that may be incompatible? Or to other places I'm not aware of?
    I have more than enough space on the SSD to partition it for both OS's (now only 10.8.3) and both Applications folders -  to speedup whichever OS I need to use.
    To have one User folder for both OS's would save a lot of drive space and make backing up much easier and faster. But I'm also not sure how I'd use Time machine with such a set up. Presently I backup with Time machine plus clones to other HD's. I'm totally confused by all this and wonder if someone out there has used the same User folder for different OS's.
    Grateful for any advise.
    Thanks,
    MartyP

    MartyP wrote:
    Or is there a problem with both OS's writing stuff to the
    ~/Home/Library folder that may be incompatible?
    Yes, big time.  Mail, for sure, has a different file/folder structure, and would not be happy.
    Plus, a number of apps (Apple and 3rd-party) are "Sandboxed."  That's a security feature, to prevent malware or bad coding from affecting things it shouldn't.  Some of their files, including the preferences files, aren't even stored in the same places!
    Or to other places I'm not aware of?
    Probably.  If you have two versions of the same app, they may or may not expect the same data setup.
    To have one User folder for both OS's would save a lot of drive space
    Not if you use some or all of woodmeister50's suggestions. 
    But I'm also not sure how I'd use Time machine with such a set up.
    Just as you do now.  By default, Time Machine backs-up everything (except things like system work files, most caches and logs, trash) for all users and all internal drives & partitions.  By default, it excludes external drives.
    You can change those defaults, of course, via TM Preferences > Options.
    See Time Machine - Frequently Asked Question #32 for details and considerations of multiple drives.
    Presently I backup with . . . clones to other HD's
    Good.   Yes, clones are different.  You need multiple "tasks" to back up multiple drives/partitions.  But once set up, that shouldn't be a big deal.

  • How can I get Firefox to run on a network with multiple users logging on with the same user name and password?

    I am trying to get Firefox running on a large network where I have multiple users that log on with the same user name and password. The problem is that when another user logs on to another computer the message comes up that their is already an instance of firefox running on that computer even though there really isn't. Only one instance can be run on the network at one time. I believe it is because firefox stores a shared profile as it thinks it is actually the same user even though it is being run on another computer. I repeat that each user that logs on uses the same user name and password but on different computers.

    I am trying to get Firefox running on a large network where I have multiple users that log on with the same user name and password. The problem is that when another user logs on to another computer the message comes up that their is already an instance of firefox running on that computer even though there really isn't. Only one instance can be run on the network at one time. I believe it is because firefox stores a shared profile as it thinks it is actually the same user even though it is being run on another computer. I repeat that each user that logs on uses the same user name and password but on different computers.

  • Can I use the same user accounts for both Lion & SL?

    I have one Mac that I can upgrade to Lion but it is the one that the entire family uses every day (I only can use it (and administer it) on weekends), so I have to make sure that there are no problems and no issues so my plan is to:
    Move all of the users accounts to a different drive.
    Configure 10.6.8 (SL) to use the user accounts on the different drive.
    Back up SL to a bootable drive.
    Repartition the Mac for a SL & Lion partition.
    Reconstitute SL on both partitions.
    Upgrade one SL partition to Lion.
    I should now have a partition for SL and Lion that both use the same users accounts so when I (and then my family) are comfortable with Lion, the switch will be transparent.
    Any problems that I am unaware of (and how to remediate it)?
    TIA.

    There are a few discussions here on the topic that I was planning to employ:
    Moving Home folder to different HDD From Mac OSX Snow Leopard via Terminal?
    Moving some Users to different volume
    How do you move a user account to a different drive?
    Another way of doing it is to move the directory, and then alter the user's home directory using the NetInfo utility (Tiger) or Directory Utility (Leopard). In both, you can change the user's home directory from the command line in Terminal.app like so:
    $ sudo dscl . -create /Users/user NFSHomeDirectory /Volumes/volname+/+user
    In the SL System Preferences -> Accounts one can select a user's account, right click and choose Advance Options presents the screen below. This is how I intend to point each OS to the same user account on an external HDD.
    Does that answer your question?
    TIA.

  • Prevent the same user login on multiple computers at the same time

    prevent the same user login on multiple computers at the same time

    Is there any way (currently running 2012 Servers) that we can prevent users from logging into multiple domain computers simultaneously with the same username?
    We still want them to log into those computers, just not simultaneously?
    LimitLogin utility not work in Windows 2012 server.
    Thanks.
    Babu
    Unfortunately Windows has never offered this feature as a built-in feature, but there are several possibilities discussed in these articles:
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/0103b5e7-0db5-4fb4-bfe7-d7132983880a/limit-concurrent-logins-on-a-ws-2008-environment
    http://www.edugeek.net/forums/windows-server-2008-r2/61216-multiple-logins.html
    http://windowsitpro.com/windows/prevent-multiple-logons-gpos
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How to conf  in Hyperion, so the system couldn't login with the same user

    Hai.....
    how to configure in Hyperion, so the system couldn't login with the same user id in different machine ? (could you please provide me with detail step by step ? )
    rgds
    uka fp

    fane_j wrote:
    Sally R. wrote:
    Someone gave me a suggestion to go to the terminal and type in the following:
    ls /Users/Shared/.*.so
    This was published on MacWorld's site, and it's not a very good tip. Try this instead
    ls -la /Users/Shared/*.so
    Turns out I was wrong about that. Somebody else suggested something even more complicated and got this reply:
    By bastion
    Fri Feb 24 08:49:05 PST 2012
    PeterSParker said
    Your terminal statement has an extra "." in it that prevents it from working.
    Also, you should add the options -alR to show what is happening, and to search subdirectories.
    The revised command looks like this:
    ls -alR /Users/Shared/*.so
    The above is completely wrong. The command as shown in the article is appropriate.
    The "." is not extra and doesn't prevent the command from working. It's specifying that you're listing files that start with a period and end with ".so" with anything in between being matched.
    Because you're explicitly searching for things that start with "." you don't need the -a flag.
    Because you only care about simple existence and not any metadata you don't need -l.
    Because the files of interest are installed in /Users/Shared directly, and not subfolders thereof, you don't need -R.

  • A user can only see the public area in a collaboration room

    Hi all,
    We have experienced that a certain user can only see the public area of
    a collaboration room although the user has member rights to see more
    content.
    We have tried to remove the user from the room and add him again. It
    did not help.
    Other users have been added before and after this user without problems.
    What could be wrong with this user?
    Regards,
    Ashwin

    Hi Ashwin,
    Check the roles and the groups by this user..  Is the same of the others users?
    Regards
    Eduardo

  • Urgent! Can't open encrypted file under the same user.

    My system is X61s, Windows XP pro sp3.
    There is no change of user account, no reinstallation or recovery of system.
    I used EPS encrypted some of my important files last month. Without any user account changes and system reinstallation I suddenly can not open the encrypted files anymore. I am aware that the change of user account or reinstalling the system will change the encrypted ID, then the encrypted file will not be opened unless there is a digital certificate of the user that encrypted the file. However I have been using the same user account since I bought the laptop and I have never reinstalled or recovered the system.
    I have tried to encrypted some other files and these files can be opened without any problem. But only the file that I encrypted about a month ago can not be opened.  Those are very important files for me. Can anyone help me to get my files back please!!!
    mod edit: moved to windows forum for better exposure.
    Message Edited by erik on 10-01-2008 11:51 PM

    hello you did not mention any error messages you were facing??
    i can only assume you are getting the follwing messages if you try to open an encrypted file...
    Cause: Encrypting File System (EFS) only works on files and folders on NTFS file system volumes. If the folder or file you are trying to encrypt is on a FAT or FAT32 volume, the Advanced button does not appear in the properties of that folder or file.
    Solution:
    Convert the volume to NTFS with the convert utility.
    Open command prompt
    Type:
    convert drive /fs:ntfs
    where drive is the drive letter of the intended drive.
    "the recovery policy configured for this system contains an invalid security certificate" or "BAD_RECOVERY_POLICY" OCCURS
    Cause: The Encrypting File System (EFS) recovery policy implemented on this computer contains one or more EFS recovery agent certificates that have expired. These certificates cannot be used.
    Solution:
    Either renew the existing certificates or generate new certificates for the EFS recovery agents and reapply the recovery agent policy with those certificates.
    the acess denied message occurs when trying to open an encrypted file
    Cause: The file was encrypted by Encrypting File System (EFS) using a public key certificate and the associated private key for this certificate is not available on this computer.
    Solution:
    Locate the private key for the appropriate certificate and import it onto this computer using the Certificates snap-in.
    Cheers and regards,
    • » νιנαソѕαяα∂нι ѕαмανє∂αм ™ « •
    ●๋•کáŕádhí'ک díáŕý ツ
    I am a volunteer here. I don't work for Lenovo

  • Can I just limit user can only modify the x value of a point?

    In my effect, I add a point by using PF_ADD_POINT. But I just want user can only modify the x value, is this possible? How can I do it?

    hello shibin.chris! welcome to the forum!
    well, there's no switch you can flip to have such behavior, but you can:
    1. supervise the param, so whenever the user changes the value you can keep
    the X and restore the Y. (won't hold water in case of keyframing or
    expression)
    2. set an expression that would do the same.
    3. check the param at some events (such as the render call), and modify the
    keyframes and values if necessary. (won't handle expressions)
    that's all i can think of.

  • I downloaded pages from the app store and I can use it on my Mac login but it doesn't show up when my wife logs in to her account? Were using the same computer, just different logins.

    I downloaded pages from the app store and I can use it on my Mac login but it doesn't show up when my wife logs in to her account? Were using the same computer, just different logins.

    No. You need to buy it for your Apple ID and for the other. You will have problems with updates

Maybe you are looking for

  • Is there a way to stay connected to a network but use wireless for my internet?

    Hello all. Quick question. I am looking at using my phone's mobile hotspot for my iMac to connect to via wifi since it's on 4G, and this internet at this house is dire. Really, really slow. I've got a wireless router plugged into the cable modem, whi

  • Price Updation in Info-Record from Purchase Order

    Hi Experts, Please Suggest ur Valuable inputs. 1) Created a Material 2) Created a Vendor 3) NOT MAINTAINED Info-Record 4) Manually Entering  the Price in Purchase Order 5) Raising a Purchase Order with respect to that Vendor with Info-Record Tick. No

  • 3510 printer dropping wireless connection

    I recently installed a 3510 printer using the wireless method and it will work for awhile then a message appears that my scan to computer is off. After this message appears i cannot print by wireless. I have reset things using the usb cord and it tel

  • Newb Question.

    I have built an Express Database using AWM that reads data from a relational table, performs some calculations and populates a different relational table. This all works great when I call the program from the OLAP Worksheet. Now I want my JSP page to

  • Deploying, ReDeploying JAR file to WebLogic EM without restarting the serve

    Hi Can any one help me how to re-deploy .jar file on weblogic EM with steps. Deploying, ReDeploying JAR file to WebLogic EM without restarting the server Appriciate if you provide information in steps with screenshot. Note: Not in weblogic 11g consol