What is the best way to get the current logged in user through Java application running on JBoss. The system environment variable System.getProperty("user.name") does not work as JBoss is running as a service.
The application is running on a laptop running Windows XP. The application is web-based and accessed using Internet Explorer by particular logged in Windows user. Only 1 Windows user can be logged in at a time. The application needs to know which user has logged in to do a role based menu and security features. So both the client (Internet Explorer) and the server (JBoss) are running on the same laptop. Currently, we determine the logged in user using tasklist /v and then parsing the output to look for certain processes and the user running them. However, need to know if there is a cleaner way of getting the logged in Windows user.