[jcifs] Problems with NtlmServlet

Tino Schöllhorn t.schoellhorn at gmx.de
Tue Aug 5 05:23:40 EST 2003


Hi,

I have some problems regarding the use of the NtlmServlet. My goal is to
create an authentication adaptor for an existing intranet application where the
authentification should be over NTLM. With that no user should be prompted
for his/her credetials. 

After I found jcifs I was really happy. I alread can authenticate via NTLM
via a normal application - but now I am working in the "browser solution". 

My configuration: I am using windows xp and iis 5.1 and tomcat 3.3 for
development and for production there will be windows nt and iis 4.0 - but I do not
expect that the problems which I encountered are stemming from this. 

So far I implemented a subclass from NtlmServlet which looks like this:

public class MyNtlmServlet extends NtlmServlet {
	
	public void init(ServletConfig config) throws ServletException {
		super.init(config);
		
		System.out.println("->MyNtlmServlet.init");
	}
	
	public void doGet(HttpServletRequest req, HttpServletResponse res) throws
IOException, ServletException {
		System.out.println("->doGet");
		
		super.service(req, res);
		
		HttpSession session = req.getSession(); 
		String user = (String)session.getAttribute("ntlmuser");
		
		System.out.println("->" + user);
		
	}
}


With that I want after automatic NTLM authentication the username. But
Internet Explorer keeps prompting me for my credentials. And even if I use the
correct values it keeps going to ask me again and again. 

Do you have any ideas where I can search the mistake I made?

In hope for help

Tino




More information about the jcifs mailing list