Hi
We are using OpenDocument URL in custom JSP to show BO Web Intelligence Document. The documents are opening fine but some of our WebI documents have links to other WebI document, when the link is clicked it takes to Info View Login Page.
If I login and logout once from InfoView then the WebI document links work fine.
Can you please guide me on how to make the session valid for WebI internal links? Do I need to create a Cookie or use URL Encoding?
Following is the sample JSP code:
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.ILogonTokenMgr"%>
<%
try{
String systemName = "ServerName";
String userName = "user";
String password = "pass";
String authType = "secEnterprise";
IEnterpriseSession enterpriseSession=null;
if (enterpriseSession == null)
{
ISessionMgr enterpriseSessionMgr = CrystalEnterprise.getSessionMgr();
enterpriseSession = enterpriseSessionMgr.logon(userName, password, systemName, authType);
}
ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();
String defaultToken = logonTokenMgr.createWCAToken("",20,10);
response.sendRedirect("http://boServer:port/OpenDocument/opendoc/openDocument.jsp?iDocID=16894&token="+defaultToken);
}
catch(Exception e)
{
e.printStackTrace();
}
%>