aspose file tools*
The moose likes Servlets and the fly likes getting system info using servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting system info using servlet " Watch "getting system info using servlet " New topic
Author

getting system info using servlet

kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
how can i get system information like computer name ,nt id etc using servlet ?
thanks in advance
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
i am able to get the ipaddress of the client
by using
String ipaddress = request.getRemoteAddr();
but how to get nt id of the computer that is logged in in the intranet
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you looked at:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html
and:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
if am using request.getRemoteUser() its returning null ?
how to get the user name who has logged into the nt machine
thanks for the responce
Eduardo Dela Rosa
Greenhorn

Joined: Apr 15, 2004
Posts: 25
Originally posted by kamesh aru:
if am using request.getRemoteUser() its returning null ?
how to get the user name who has logged into the nt machine
thanks for the responce


Hi, as per Servlet 2.x specifications, the returns
the login of the user making the request, if the user has been
authenticated, or if the user has not been authenticated. Whether
the user name is sent with each subsequent request depends on the
browser and type of authentication.


Eduardo dela Rosa<br />SCJP 1.4
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61222
    
  66

type of authentication.


Which means. of course, container-based authentication which has nothing to do with Windows login.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
thanks for the responses.
is there way of using JAAS and getting the login username in the intranet?
 
 
subject: getting system info using servlet