Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Get the Current User of web application using Java

  1. #1
    Junior Member
    Join Date
    Sep 2022
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Get the Current User of web application using Java

    Good Day,

    I have a web application deployed on Linux server, and I need to get logged in user (current windows user).
    I used System.getProperty("user.name") but it gets the os user name for the server not the client.
    Also, I used request.getRemoteUser() and it returns null.
    Is there any another way? I am stuck in this issue for a long time.
    Thank you.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Get the Current User of web application using Java

    Has the user set a name as a field in the current form?
    Has the user's name been captured earlier and sent to the server in a Cookie?

    The only thing I can think of as a piece of information about a connected user is his IP address which is available on the server.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. How do I import user defined packages to my java application.
    By kunalgaurav18 in forum Java Theory & Questions
    Replies: 6
    Last Post: October 11th, 2012, 01:41 PM
  2. Tutorial for web application with user accounts
    By tarkal in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: February 15th, 2012, 03:51 PM
  3. Want to make java application available to all user of Network
    By nicool in forum Java Theory & Questions
    Replies: 5
    Last Post: September 25th, 2011, 07:38 AM
  4. Replies: 4
    Last Post: August 17th, 2011, 02:53 PM