• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting Terminal PC Names

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am making a local intranet web project that makes use of servlets and jsp. I just would like to know if its possible to retrieve the domain pc names of every user that logs into my system using web application. I could have done it if its client side programming using Swing but I wanted to try it out using servlets and jsp.

I have run through the request object of the servlet and found request.getRemoteUser(). But as I have read, this returns the loginID of the user that browse the system.

Could someone tell me if its possible to retrieve the Computer name of every users that logs into my system. Thanks all.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. This is not information that is sent to the server. The methods on the request instance and any information sent in the request headers is all that you get.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it is a local intranet application and you want the machine name, you should be able to use getRemoteHost or similar, and if this fails you may be able to get their IP and look up the machine name.

If you want the name of the person logged in to that machine, that is harder and may require purchasing something that manages NTLM, and I think it only works in Windows(tm) domains.
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sir,

Thanks for the information. I could use getRemoteHost of the request object. It returns the IP address of the terminal logging in.

I only have some minor problem because IP address is dynamically assigned in the network but I guess I will just have to make a utility class that access the network and query the terminal name given the IP address.

Thanks again..
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic