Help!!! Who's calling my JSP?

F

Fran Cottone

A user on the corporate intranet ( Windows 2000 ) fires up their web
browser and points at my JSP ( running on Tomcat 5.5 ).

I want my JSP to be able to automatically detect their network
username. I don't want them to type in a thing - EVER! I want to
harness Windows authentication. For simplicity sake, let's just assume
that the purpose of the JSP is to simply say: "Hello [windows 2000
username]";

I've asked this question a number of times in a number of ways to a
number of different people, but don't get the answer I'm looking for!!
Maybe I'm asking in the wrong way!

I'm a big Java fan, but have had to learn from scratch and write my
web application in VBScript using notepad. Believe it or not, its been
a lot faster writing the ASP because of the simple, easy to use
authentication options available in IIS. I know Java is supposedly
platform agnostic, but please, there must be a simple way of pluging
in some means of detecting a platform specific username. Note, the
detection of the username MUST take place on the web server. I'm not
looking to detect it in a Java desktop application!
 
A

Andrea Desole

Fran said:
I'm a big Java fan, but have had to learn from scratch and write my
web application in VBScript using notepad. Believe it or not, its been
a lot faster writing the ASP because of the simple, easy to use
authentication options available in IIS. I know Java is supposedly
platform agnostic, but please, there must be a simple way of pluging
in some means of detecting a platform specific username. Note, the
detection of the username MUST take place on the web server. I'm not
looking to detect it in a Java desktop application!

as you said, it's platform specific. You will have to use jni. I don't
know if there is a library that does it.
This is probably not the answer you are looking for
 
M

Marcin Grunwald

Fran said:
A user on the corporate intranet ( Windows 2000 ) fires up their web
browser and points at my JSP ( running on Tomcat 5.5 ).

I want my JSP to be able to automatically detect their network
username. I don't want them to type in a thing - EVER! I want to
harness Windows authentication. For simplicity sake, let's just assume
that the purpose of the JSP is to simply say: "Hello [windows 2000
username]";

I've asked this question a number of times in a number of ways to a
number of different people, but don't get the answer I'm looking for!!
Maybe I'm asking in the wrong way!

I'm a big Java fan, but have had to learn from scratch and write my
web application in VBScript using notepad. Believe it or not, its been
a lot faster writing the ASP because of the simple, easy to use
authentication options available in IIS. I know Java is supposedly
platform agnostic, but please, there must be a simple way of pluging
in some means of detecting a platform specific username. Note, the
detection of the username MUST take place on the web server. I'm not
looking to detect it in a Java desktop application!

It's not the solution you want but may help.

Save user login and password in cookie (persist cookie). Thanks to that,
user have to type login/password only once during first login.

For security reasons encrypt password.
 
R

Rogan Dawes

Fran said:
A user on the corporate intranet ( Windows 2000 ) fires up their web
browser and points at my JSP ( running on Tomcat 5.5 ).

I want my JSP to be able to automatically detect their network
username. I don't want them to type in a thing - EVER! I want to
harness Windows authentication. For simplicity sake, let's just assume
that the purpose of the JSP is to simply say: "Hello [windows 2000
username]";

Try the JCIFS project:

http://jcifs.samba.org/

and specifically

http://jcifs.samba.org/src/docs/ntlmhttpauth.html

Rogan
 
M

Malte

Fran said:
A user on the corporate intranet ( Windows 2000 ) fires up their web
browser and points at my JSP ( running on Tomcat 5.5 ).

I want my JSP to be able to automatically detect their network
username. I don't want them to type in a thing - EVER! I want to
harness Windows authentication. For simplicity sake, let's just assume
that the purpose of the JSP is to simply say: "Hello [windows 2000
username]";

I've asked this question a number of times in a number of ways to a
number of different people, but don't get the answer I'm looking for!!
Maybe I'm asking in the wrong way!

I'm a big Java fan, but have had to learn from scratch and write my
web application in VBScript using notepad. Believe it or not, its been
a lot faster writing the ASP because of the simple, easy to use
authentication options available in IIS. I know Java is supposedly
platform agnostic, but please, there must be a simple way of pluging
in some means of detecting a platform specific username. Note, the
detection of the username MUST take place on the web server. I'm not
looking to detect it in a Java desktop application!

I believe that if you look into some of the more recent JDK's from Sun
you will find classes that will do ntlm lookup. This should work for
recent Mozilla/Firefox browsers as well as for MSIE.
Be aware that this is not fool proof, though. The MSIE browsers must be
fairly recent. Obviously, this also only works for Windows clients, and
not all Windows OS versions are supported. We use it at a customer site
for single sign on on the Intranet. They use Oracle and the solutions
was implemented using Java.
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top