1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
Bonjour
dans businessobjects crystal report 11 lorsque que l''on
passe par une url directement pour acceder a un document
URL = http://serveur/businessobjects/enterprise11/desktoplaunch/opendoc/openDocument.jsp?sDocName=Doc_Acquisition&apsuser=Myuser&apspassword=123
La premiere fois en passant par l url la boite de login s'affiche demandant le nom d'utilisateur et puis le mot de passe meme si c'est referencé dans l'URL, et accede au document Doc_Acquisition la deuxieme fois cela accede au document directement .Je voudrez que que cela accede au document directement la premiere fois --> voila les scripts Jsp de Crystal report .
(logon.do dans le code source est la fenetre d'authentification que je ne desire pas afficher )
Quelle ligne faut t'il modifier pour que la boite de login ne s'affiche pas
Merci
Documentxml.jsp
----------------
<HTML>
<HEAD>
<SCRIPT language="javascript">
// <!--
function redirect()
{
document.extForm.referer.value = '/opendoc/documentXML.jsp?null'
document.extForm.submit();
}
// -->
</SCRIPT>
</HEAD>
<BODY onLoad="redirect();">
<HTML>
<form method="POST" name="extForm" action="/businessobjects/enterprise11/desktoplaunch/InfoView/logon/logon.do">
<input value="" name="referer" type="hidden"/>
<input value="" name="token" type="hidden"/>
</form>
</BODY>
</HTML>
open document.jsp
--------------------
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
</HEAD>
<SCRIPT language='javascript1.3'>
function getQueryParamValue(strQueryString, strParamName) {
var strRet = "";
if("undefined" != typeof(strQueryString) && strQueryString != null) {
var arrQueryParam = strQueryString.split('&');
for (var i=0;i<arrQueryParam.length;i++) {
var strName = arrQueryParam[i];
var strValue = "";
var iPos = arrQueryParam[i].indexOf('=');
if (iPos>=0) {
strName = arrQueryParam[i].substring(0, iPos);
strValue = arrQueryParam[i].substring(iPos + 1);
}
if (strParamName == strName) {
strRet = strValue;
break;
}
}
}
return strRet;
}
function MM_openBrWindow(theURL, winName, features, bUnique) {
var _winName = winName;
if (!bUnique) {
var dtemp = new Date();
_winName = _winName + dtemp.getTime();
}
pop = window.open(theURL, _winName, features);
pop.opener = self;
}
function findParent() {
/*
var found = false;
var frameToFind = "XML.jsp";
var obj = window;
try {
while (!found && typeof(obj.parent) != "undefined" && obj.parent != obj) { //escape clause please
var loc = "" + obj.parent.document.location;
if (loc.indexOf(frameToFind) < 0) {
obj = obj.parent;
}
else {
found = true;
}
}
}
catch(e) { //cross domain issue ? assume that this URL is like an external one
found = false;
}
//if test needed
if (found) { //open in parent ie documentXML or myInfoviewXML frame level
obj = obj.parent;
if (("" + obj.document.location.href).indexOf("documentXML.jsp") > 0) {
//we are in documentXML frameset, let's stack the current documentXML URL (including possibly new token)
//to allow backward navigation (close) history
//we ask the action header bar the real UID of the (previously) opened doc
if (typeof(obj.parent.push) != "undefined" && typeof(obj.getDocUID) != "undefined") { //the stack should be defined in webiHome.jsp
//calculate the URL, knowing the current docUID, and asking viewer for the last storage token
var curDocUID = obj.getDocUID();
var sURL = "documentXML.jsp?ctxLayout_last=fromSession&cmdBlock=all&cmd=askView&cmdP1=" + URLEncodeUTF8(curDocUID); //here is the real URL to come back to the currently opened document
obj.parent.push(sURL, obj.timeStamp); //push this URL into the stack, and stamp it to help manage browser's back/forward
}
}
if (typeof(obj.asyncOpenDocument) != "undefined") {
var bIE = (document.all ? true : false);
var sViewerURL = obj.frames[1].location.href;
var sViewType = getQueryParamValue(sViewerURL, "ViewType") ;
obj.asyncOpenDocument('documentXML.jsp?cmdP1=untitled*0*1***&token=&cmd=askView&cmdBlock=all&cmdP2='); //asynchronous launch of URL
if (!bIE || sViewType != "P") { //Don't do back if the document is wid or rep and viewed on PDF on IE
//FR 103137, apparently acroread on IE is already doing this...
history.back();
}
}
else obj.document.location.href = 'documentXML.jsp?cmdP1=untitled*0*1***&token=&cmd=askView&cmdBlock=all&cmdP2=';
}
else { //this should handle the external URL case ...
//document.location.href = '/businessobjects/enterprise11/desktoplaunch/scripts/login/topStart.html';
document.location.replace('/businessobjects/enterprise11/desktoplaunch/scripts/login/topStart.html');
}
*/
document.location.replace('documentXML.jsp?cmdP1=untitled*0*1***&token=&cmd=askView&cmdBlock=all&cmdP2=');
}
</SCRIPT>
<BODY onload='findParent();'></BODY>
</HTML>
:cry: |
Partager