I am working on a Java web application that requires the computer name of clients connecting to it. Initially, I attempted to retrieve this information using JavaScript and store it in a hidden form field. However, I discovered that JavaScript does not have the ability to access this data.
Next, I tried utilizing an applet and accessing its methods via JavaScript. While this method proved successful on Firefox, it did not work on newer versions of Chrome which do not support applets.
I then considered transitioning to a Java Webstart application, but realized that JavaScript would be unable to access its methods since the Webstart application runs outside the browser.
Another approach I explored was saving the hostname in the environment TEMP directory. This worked on Firefox with Linux and Java7 but failed on Firefox with Windows and Java8, as the applet did not run. Furthermore, I encountered difficulties accessing the defined TEMP directory and reading the file in JavaScript.
Despite exhausting these options, I am still seeking input and suggestions from the community. Does anyone have any ideas on how to achieve this? Have I overlooked a simple solution?
It is important to note that I specifically require the computer-defined hostname, not the DNS-resolved IP address.
Thank you for any assistance you can provide.