How to get the current windows username?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to get the current windows username?

  1. #1
    Join Date
    Jul 2007
    Posts
    1

    How to get the current windows username?

    hi,

    I m new for java. Is there any way for me to get the username/password of the windows when a user was browsing my JSP page??

    scenario:
    I have a login page which will required to key in the username and password. Once the user type in the username/password, it's will check with the current windows user login username and password.

    If they are same, it's will allow the user to access the menu.

    How can i retrieve the username/password from windows ?? This jsp was located in the unix based server.

    I search through the net, advapi32.dll was the one controlling the windows logonuser... how can i access it?? Is there any sample code??

  2. #2
    Join Date
    Mar 2004
    Posts
    635
    Only way to do such a thing that I'm aware of is if there's an LDAP server set up that you could connect to.

Similar Threads

  1. MS Windows OS admin opening - NYC
    By csiwhq in forum Careers
    Replies: 0
    Last Post: 12-20-2005, 12:55 PM
  2. [OT] installing windows xp problem
    By Carcophan in forum C++
    Replies: 2
    Last Post: 11-28-2005, 11:26 PM
  3. Create Windows Username
    By rkbnair in forum VB Classic
    Replies: 1
    Last Post: 10-10-2005, 11:29 AM
  4. Screensaver in Windows 2000
    By Jeff Richard in forum VB Classic
    Replies: 1
    Last Post: 07-01-2002, 11:28 PM
  5. Replies: 8
    Last Post: 01-19-2001, 06:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center