cancel
Showing results for 
Search instead for 
Did you mean: 

how to provide multiple links in a single JSP

Former Member
0 Kudos

Hi Experts,

I am done with a single doc link in jsp file ,now my requirement is to use a single jsp file for multiple docs.

Like I have 10 WEBI reports and I want to open it from separate application without passing BO user name and password .Can I achive it with a single JSP.

Please advice how to do it.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vikas,

You can use something like the below code

===================================

<%@ 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"%>
<%@ page import = "com.crystaldecisions.sdk.framework.*"%>
<%@ page import = "com.crystaldecisions.sdk.properties.*" %>
<%@ page import = "com.crystaldecisions.sdk.framework.*" %>
<%@ page import = "java.util.*" %>


<html>
<body>
<%
IEnterpriseSession eSession = null;

try
{
  String CMS = "cmsname";
   String username = "username";
  String password= "password";
   String Auth = "secEnterprise";
  ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
  eSession = sessionMgr.logon(username,password,CMS,Auth)
 
  ILogonTokenMgr logonTokenMgr = eSession.getLogonTokenMgr();
  String defaultToken = logonTokenMgr.getDefaultToken();
  String open = "http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AZQxKFpLb2JDqfKNxVI_10g&sIDType=C...;
  String open1 ="http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AUGC0aj3IsdDngyQfsguyjw&sIDType=C...;
  String open2 ="http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AXDEPU6w1J1Bgp69rr7Ir0c&sIDType=C...;
  String open3 ="http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=ATL0N_2D8JNDmx.DblcXoMM&sIDType=C...;
%>
<div align="center">
<b>Open Document Sample Application</b>
</div>
<br />
<br />
<b>Select Reports List:</b><br />
<br />
<a href = "<%= open %>" target= "myframe">Report1</a><br />
<a href = "<%= open1 %>" target= "myframe">Report2</a><br />
<a href = "<%= open2 %>" target= "myframe">Report3</a><br />
<a href = "<%= open3 %>" target= "myframe">Report4</a> <br />

<iframe src="" name="myframe" width="900" height="500" align="center">

 

</iframe>


<%
out.println("<br />");

}
catch(Exception e)
{
  out.println(e.getMessage());
}
%>

</body>
</html>

================================================

Thanks,

Prithvi

Message was edited by: Prithviraj Shekhawat

Former Member
0 Kudos


WOW that works in a single go.

You are awsome man.Thanks again

Answers (0)