how can I get username in my web application?

E

eeyimaya

I use IIS 6.0 and Tomcat 5.5.7.

In IIS -> Directory Security -> Authentication Methods, I set the
"Digest Auth. for windows domain servers" checkbox so that users can
log on by domain username/passwords.

When user wants to enter the site windows login panel appears, after
entering the domain username/password user can login.

But I could not found a way to get the username in my jsp/servlet.
Is it possible? how?

Thanks...
 
O

Oscar kind

eeyimaya said:
When user wants to enter the site windows login panel appears, after
entering the domain username/password user can login.

But I could not found a way to get the username in my jsp/servlet.
Is it possible? how?

See javax.servlet.http.HttpServletRequest#getUserPrincipal()
and java.security.Principal#getName()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top