多应用Session共享时使用Flash上传在火狐中Session丢失问题

2 篇文章 0 订阅
2 篇文章 0 订阅
目前在使用Flash控件做上传文件功能时遇到一个问题。
FireFox中使用Flash上传文件时Session信息丢失。
由于在Flash中使用了FileReference上传文件时Session丢失


Adobe文档如此解释
The FileReference and FileReferenceList classes also do not providemethods for authentication. With servers that require authentication,you can download files with the Flash® Player browserplug-in, but uploading (on all players) and downloading (on thestand-alone or external player) fails. Listen for FileReference eventsto determine whether operations complete successfully and to handleerrors.



解决方法
1. 不使用FileReference,而使用form post上传文件。这样和普通的Html页面一样了。
2. 将Session id传到服务器。 如果你使用的Server是TomCat/JSP 可以如下添加SessionID. var request:URLRequest = new URL Request("http://www.[your url].com" ";jsessionid=" _yoursessionid); 3. 不验证Session,而检查上传ID。比如每次上传前,服务器生成一个ID,上传的时候把这个传ID作为URLRequest的参数传过去。
4. 将需要验证的用户名密码,添加至URLRequest的参数,在服务器端进行验证,然后在服务器端,将用户信息存入session,这样,只要flex页面session不变,下次提交请求时,服务器端的session就是保存用户信息的session。
5. 等待adobe发布hotfix.


目前文件我采用的是添加jsessionid的方式解决。

参考目录:
http://blog.sina.com.cn/s/blog_4b25b7d50100lhfg.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值