|
Problem with JCIFS NTLM Authentication for HTTP Connections: msg#00045network.samba.java
Hi, I'm facing 2 problems using the JCIFS NTLM Authentication for HTTP Connections. 1) The authentication is only successful when login and password are sent in the url. Setting domain, username and password as Config.setProperty("jcifs.smb.client.domain", domain); Config.setProperty("jcifs.smb.client.username", user); Config.setProperty("jcifs.smb.client.password", password); has not worked. What is the different between the two ways? 2) The authentication and authorization seem to work fine if user is authorized to access the servlet. As login.jsp is defined to be the login config form, I would expect that login.jsp would be returned in case user is not authorized (This has worked without NtlmHttpFilter). Instead, I got an exception. The code looks as followed: HttpURLConnection connection = (HttpURLConnection)u.openConnection(); connection.setDoOutput(true); connection.setRequestProperty("Cookie", cookie); connection.setRequestProperty("COOKIE", cookie); OutputStream out = connection.getOutputStream(); out.write(webToolRequest.toXml().getBytes()); int i; InputStream in = connection.getInputStream(); The last statement throw the exception: java.lang.ClassCastException at jcifs.http.NtlmHttpURLConnection.reconnect(NtlmHttpURLConnection.java:58 1) at jcifs.http.NtlmHttpURLConnection.attemptNegotiation(NtlmHttpURLConnectio n.java:527) at jcifs.http.NtlmHttpURLConnection.doHandshake(NtlmHttpURLConnection.java: 440) at jcifs.http.NtlmHttpURLConnection.handshake(NtlmHttpURLConnection.java:10 3) at jcifs.http.NtlmHttpURLConnection.getResponseCode(NtlmHttpURLConnection.j ava:393) at com.hp.eis.eib.tools.servletcaller.WebToolServletCaller.callServlet(WebT oolServletCaller.java:196) Thanks a lot for your help My Chi Doan |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Davenport authentication via web folders: 00045, Paul Scott |
|---|---|
| Next by Date: | Your site is now linked to ours - please check link for accuracy: 00045, Data Management Resources |
| Previous by Thread: | Davenport authentication via web foldersi: 00045, Paul Scott |
| Next by Thread: | Re: Problem with JCIFS NTLM Authentication for HTTP Connections: 00045, Michael B Allen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |