Fetch Intranet username

F

francan

I am using Apache Tomcat 6.0.18 on a Windows Server that also has IIS.
For IIS I can enable Integrated Windows authentication to fetch the
Intranet Windows login username using ColdFusion. Is there a setting
in Apache Tomcat I need to enable Integrated Windows authentication so
I can fetch the Intranet Windows login username by using JSP in Apache
Tomcat?

This would be what I use to fetch the username:
System.getenv("USERNAME")

The current output is SYSTEM instead of my username.

On my local development Tomcat 6.0.18 I can fetch my username with the
System.getenv("USERNAME").

Please advise.
 
A

Arne Vajhøj

francan said:
I am using Apache Tomcat 6.0.18 on a Windows Server that also has IIS.
For IIS I can enable Integrated Windows authentication to fetch the
Intranet Windows login username using ColdFusion. Is there a setting
in Apache Tomcat I need to enable Integrated Windows authentication so
I can fetch the Intranet Windows login username by using JSP in Apache
Tomcat?

This would be what I use to fetch the username:
System.getenv("USERNAME")

The current output is SYSTEM instead of my username.

On my local development Tomcat 6.0.18 I can fetch my username with the
System.getenv("USERNAME").

Try request.getRemoteUser() and request.getUserPrincipal() !

Arne
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top