Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Implemented logout.jsp to clear cookies still not working

CSU_OIMSep 18 2015 — edited Sep 18 2015

we have SAML and Obiee.The default saw.dll?LogOff does not work .It does not log out of OBIEE.

So we added a custom jsp code the the analytics.ear file, still not working .Any thoughts

<%@page import="java.util.*"%>

<%

  boolean debug = false;

   Cookie cookie = null;

   Cookie[] cookies = null;

   String cname = null;

   // Get an array of Cookies associated with this domain

   cookies = request.getCookies();

    String domainName=request.getServerName();

  

   if( cookies != null ){

      if (debug) {

        out.println("<h2> Found Cookies Name and Value</h2>");

      }

      for (int i = 0; i < cookies.length; i++){

         cookie = cookies[i];

         cname = cookie.getName();

         cname = cname.toLowerCase();

  

  if(cname.startsWith("ora_bips")){ 

  cookie.setMaxAge(0);

          

  //cookie.setDomain(domainName);

  //cookie.setPath("/analytics");

            response.addCookie(cookie);

  }else if(cname.equals("jsessionid")){ 

     cookie.setMaxAge(0);

          

  cookie.setPath("/analytics");

            response.addCookie(cookie);

  cookie.setMaxAge(0);           

  cookie.setPath("/");

  response.addCookie(cookie);

  }else{

  cookie.setMaxAge(0);

            //cookie.setValue("");

            response.addCookie(cookie);

  }

      }

  }else{

      if (debug) {

        out.println("<h2>No cookies founds</h2>");

      }

  }

 

 

  /** gets Atribute names */

  if(request.getSession() != null){

      

  Enumeration e=session.getAttributeNames();

  while (e.hasMoreElements())

  {

    String name = (String) e.nextElement();

                

    // Get the value of the attribute

    Object value = getServletConfig().getServletContext().getAttribute(name);

  session.removeAttribute(name);      

  }

    session.invalidate();

 

  }

 

%>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details