J2SE代理验证 [英] J2SE Proxy Authentication

查看:99
本文介绍了J2SE代理验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用2个SIMILAR Microsoft ISA Proxy Server 2003连接到互联网。
每个代理具有不同的登录样式,如下所示:

We use 2 SIMILAR Microsoft ISA Proxy Server 2003 to connect to internet. Each Proxy has different Login style, as below :

Server-1:nt-domain \\\ nalan
Server-2:alan @ love -u.com

Server-1 : nt-domain\alan Server-2 : alan@love-u.com

通过Wifi登录IE,Firefox和我的Phonecell都很好。
但是,当我们运行java应用程序J2SE Ver 4,5和6,
需要互联网身份验证时,会出现问题。
登录到Server-2是正常的,但是对于Server-2是FAIL(样式:alan@domain.com)。

Logon in IE, Firefox and my Phonecell via Wifi all are fine. But, a problem appears when we run a java application J2SE Ver 4, 5 and 6, where it needs internet authentication. Logon to Server-2 is OK, but FAIL for Server-2 (style : alan@domain.com).

注意:使用Windows时看到的两个代理身份验证,输入:协商NTLM

Note : Both proxy seen using Windows authentication, type : negotiate NTLM

如果您可以提供帮助或任何建议,请接受。

Appreceate if you can help or for any suggest.

谢谢,

Alan L

推荐答案

java文档描述了如何在java中启用NTLM身份验证。如果您有权访问源,则可以按照proxy文章,添加如下内容(另请参阅讨论 of axis2):

The java documentation describes how to enable NTLM authentication in java. If you have access to source, you can programmatically add system properties as described in "proxy" article, adding something as follows (see also discussion of axis2):

System.setProperty("http.auth.ntlm.domain", mydomain);

如果您无权访问源,则可以在启动Java二进制文件的命令行上设置属性,添加如下内容:

If you have no access to source, you can set properties on the command line that launches your java binary, adding something like:

java -DproxyHost=host  -DproxyPort=8080  -Dhttp.auth.ntlm.domain=mydomain  ...

这篇关于J2SE代理验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆