繁体   English   中英

具有基于表单身份验证的Java Applet在IE上无法在Chrome上运行

[英]Java Applet with form based authentication works on IE fails on Chrome

设置如下:打包Java Applet组件并使用基于表单的身份验证的Web应用程序(EAR文件)已部署到WebSphere8。Workstation使用Java 1.7.0_45。

在对登录表单进行身份验证之后从IE11连接时,WebSphere返回一个包含Applet标记的HTML页面。 然后,可以从WebSphere正确下载Applet Jar文件,并启动Applet。

但是,在使用Chrome浏览器时,Applet Jar文件的下载失败,好像身份验证令牌丢失了一样。

这是Java插件跟踪文件的摘录:

IE11(不错)

network: Connecting http://myserver:9088/MOBILE/jam.jar with proxy=DIRECT
network: Connecting http://myserver:9088/ with proxy=DIRECT
network: Connecting http://myserver:9088/MOBILE/jam.jar with cookie "LtpaToken2=..."
network: Downloading resource: http://myserver:9088/MOBILE/jam.jar
    Content-Length: 632,160
    Content-Encoding: null

铬(不良)

    network: Connecting http://myserver:9088/MOBILE/jam.jar with proxy=DIRECT
    network: Connecting http://myserver:9088/ with proxy=DIRECT
    network: Server http://myserver:9088/MOBILE/jam.jar requesting to set-cookie with "WASReqURL=http://myserver:9088/MOBILE/jam.jar; Path=/; HttpOnly"
    network: Cache entry not found [url: http://myserver:9088/MOBILE/adminLogin.html, version: null]
    network: Connecting http://myserver:9088/MOBILE/adminLogin.html with proxy=DIRECT
    network: Connecting http://myserver:9088/ with proxy=DIRECT
    network: Downloading resource: http://myserver:9088/MOBILE/adminLogin.html
        Content-Length: 1,187
        Content-Encoding: null
    java.io.IOException: Invalid jar file
        at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)

请注意,当Chrome显示“ request to set-cookie with”消息时,IE11如何发送LtpaToken2令牌cookie。

任何建议都欢迎。

实际上,这是另一种方式;-)

IE (bad)
Chrome (good)

由于websphere 默认情况下激活 HttpOnly标志(使用google翻译,未找到英语版本),因此chrome可以正常运行。 IE只是忽略该标志,仍然发送cookie,因此违反了规范。 如果要允许允许Java applet访问cookie,则必须在Websphere设置 (全局)或Web应用程序 (本地)中禁用HttpOnly设置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM