jsp页面无法加载cab包的问题(急、急、急)
各位好,目前我遇到了这样一个问题,我从某视频摄像头厂商那边得到了一个cab包,当使用html静态页面加载这个cab包时,ie浏览器会提示是否下载此activex控件,当我把这个html页面修改后缀名编程jsp页面并使用tomcat发布后访问这个jsp页面则不会有要下载activex控件的提示,ie浏览器无法加载此控件。
请问此问题该如何解决?谢谢各位指点。
[解决办法]
贴出你HTML中<object >代码
[解决办法]
你的CAB没经过签名,直接被阻止了,要用合法的数字签名
[解决办法]
这个不应该是jsp本身的问题,这东西加在完全靠浏览器,不信你可以把你的html放到你的应用中,用http方式访问估计也是不行。“此时如果直接双击运行这个html页面则会出现要求下载ocx控件”从这句话来看,应该是安全性的问题,双击是本地运行,安全性要求低,http方式要求高,你还是设置一下浏览器安全性吧。
[解决办法]
<%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><html> <head> <title>CAPICOM - SignedData Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <script language="jscript"> var CAPICOM_CURRENT_USER_STORE = 2; var CAPICOM_STORE_OPEN_READ_ONLY = 0; var CAPICOM_ENCODE_BASE64 = 0; var CAPICOM_ENCODE_BINARY = 1; var CAPICOM_INFO_SUBJECT_SIMPLE_NAME = 0; var CAPICOM_INFO_ISSUER_SIMPLE_NAME = 1; var CAPICOM_INFO_SUBJECT_EMAIL_NAME = 2; var CAPICOM_INFO_ISSUER_EMAIL_NAME = 3; function SelectMySignCert() { //cert store var mystore = new ActiveXObject("CAPICOM.Store"); mystore.Open(CAPICOM_CURRENT_USER_STORE,"My",CAPICOM_STORE_OPEN_READ_ONLY); var certs= mystore.Certificates; //myca sign certs //var mycacerts= certs; var mycacerts= new ActiveXObject("CAPICOM.Certificates"); for(i=1;i<=certs.Count;i++) { //var issuer=certs.Item(i).IssuerName; //if(issuer.indexOf("CN=test")<0) // continue; //check key usage var ku=certs.Item(i).KeyUsage(); //if(!ku.IsDigitalSignatureEnabled) //not sign cert //continue; //add mycacerts.Add(certs.Item(i)); } if(mycacerts.Count==0) { if(window.confirm("没有找到MYCA签发的证书,\r\n请插入相应的Ekey再按确定")==true) return SelectMySignCert(); else return null; } //select cert //var certsel= mycacerts.Select("选择证书1","请选择证书1:",false); var certsel= mycacerts.Select(); if(certsel==null)return null; var cert= certsel.Item(1); // cert.Display(); return cert; } function SignText(strtext) { //select cert try{ var mysigncert= SelectMySignCert(); if(mysigncert==null)return null; //signed data var signer = new ActiveXObject("CAPICOM.Signer"); signer.Certificate = mysigncert; var signeddata = new ActiveXObject("CAPICOM.SignedData"); var utils = new ActiveXObject("CAPICOM.Utilities"); signeddata.Content = utils.BinaryStringToByteArray(strtext); //alert(signeddata.Content); return signeddata.Sign(signer,false,CAPICOM_ENCODE_BASE64); }catch(e){ alert("调用证书签名出错!"); return null; }} </script> <script language="javascript"> function submitform() { var signature= SignText(document.form1.orgSign.value); //alert(signature); if(signature==null){ return; } form1.signData.value= signature; form1.submit(); } </script> </head> <body onload="submitform();"> <form name="form1" action="authSigner.action" method="POST"> <input type="hidden" name="signData" value=""> <br /> <input type="hidden" name="orgSign" value="<%=(String)session.getAttribute("certificateChallenge")%>" size=30> </form> <OBJECT id="oCAPICOM" codeBase="<%=basePath %>/web/script/capicom.cab#version=2,0,0,3" classid="clsid:A996E48C-D3DC-4244-89F7-AFA33EC60679"> </body> </html>这是我的。。整个都贴出来你看看