Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Custom page session not working

Hi All,

I have modified custom.jsp file to customize BI launchpad, where in this page I put code to display logon form and after form submission it will go to Action.jsp to validate credentials using below code.

*********************************************************************************

// If no session already exists, logon using the specified parameters.

if (enterpriseSession == null)

{

  try

  {

  // Log on to BusinessObjects Enterprise

  enterpriseSession = CrystalEnterprise.getSessionMgr().logon(strUserName,strPassword, "XXX:6400" ,strAuthType );

  defaultLogonToken = enterpriseSession.getLogonTokenMgr().getDefaultToken();

  enterpriseSession = CrystalEnterprise.getSessionMgr().logonWithToken(defaultLogonToken);

  // Store the IEnterpriseSession object in the session.

  session.setAttribute("EnterpriseSession", enterpriseSession);

  // Create the IInfoStore object.

  IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");

  // Store the IInfoStore object in the session using the

  // helper functions.

  session.setAttribute("InfoStore", iStore);

  

  // Store the logon token for later use.

  session.setAttribute("token", defaultLogonToken);

  }

  catch (SDKException e) {  sSuccessFailMsg = e.getMessage();

*********************************************************************

This code is working fine and I am able to logon and go to home page, below is the issue I am facing can you please let me know how to solve this issue.

Once I logon to BI launchpad, if I refresh web page it's redirecting me to logon page again and also in next tab if I use same URL it's asking to to enter logon details.

Please lt me know how to use defaultlogon token to login without entering credentials.

Thanks,

Mani

Former Member
Former Member replied

Hello All,

I am able to resolve above issue by checking BO session in Custom.jsp. I think this  will be helpful for someone who is trying to do customization.

IEnterpriseSession enterpriseSession =(IEnterpriseSession)session.getAttribute("EnterpriseSession");

if (enterpriseSession != null)

{

String defaultLogonToken= (String)session.getAttribute("token");

response.sendRedirect ("/BOE/BI/logon/start.do?ivsLogonToken=" + defaultLogonToken);

}

Thanks,

Mani

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question