Session management in Info View with two different logins using single sign

There is a form with 2 user logins UserA and User B to redirect to infoview with sso in my application. I am able to go to each of the Infoview pages successfully but have the following problem.
User A logs in and infoview opens in a new IE window and sees his/her folders based on permissions and is able to do his/her work for the first time.
User B logs in andand infoview opens in a new IE window sees his/her folders based on permissions and is able to do his/her work for the first time.
<b>After a while when User A tries to access the InfoView in the previously opened IE Window, he/she gets an error message. An error has occurred: The object with ID 2519 does not exist in the CMS or you don't have the right to access it.
User B is able to continue his/her work. Who ever logs in the last, he/she is able to continue his/her work but the other one gets an error.</b>
<b>Please let me know on how to address this issue . I added logonToken and tried everything at my hand but no success. Is this session controlled by business objects or by the jsp page. What more changes are required for my jsp page to fix the error. Attached below are the form and the applogon.jsp snippets.</b>
<B> applogon.jsp</B>
    IEnterpriseSession enterpriseSession = null;
    Exception failure = null;
    boolean loggedIn = true;
     String redirectURL = null;
     // If no session already exists, logon using the specified parameters.
    if (enterpriseSession == null){
        try{
            // Attempt logon. Create an Enterprise session manager object.
            ISessionMgr sm = CrystalEnterprise.getSessionMgr();
            // Log on to BusinessObjects Enterprise
            enterpriseSession = sm.logon(username, password, "cms", "secEnterprise");
        }catch (Exception error){
            loggedIn = false;
            failure = error;
        if (!loggedIn){
            // If the login failed, redirect the user to the start page.
            return;
        }else{
            // 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 CMS name for later use.
            session.setAttribute("CMS", "CMS");
               // Create the IReportSourceFactory object.
               IReportAppFactory reportAppFactory =(IReportAppFactory)enterpriseSession.getService("RASReportService");
               // Store the IReportSourceFactory object in the session using the helper functions.
               session.setAttribute("ReportAppFactory", reportAppFactory);
            // Retrieve the logon token manager.
            ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();
               String logonToken = logonTokenMgr.createLogonToken("", 60, 100);
               String infoViewURL = null;
               String tokenParam = null;
               infoViewURL = "/businessobjects/enterprise115/desktoplaunch/InfoView/logon/logon.do";
               tokenParam = "token=" + logonToken;
               redirectURL = infoViewURL + "?" + tokenParam;
            // Retrieve a logon token and store it in the user's cookie
            // file for use later.
            Cookie cookie = new Cookie("LogonToken", logonTokenMgr.createLogonToken("", 60, 100));
            response.addCookie(cookie);
            // Store the logon token for later use.
            session.setAttribute("token", enterpriseSession.getLogonTokenMgr().getDefaultToken());
     // Redirect the user to the relevant tutorial page.
     out.println("You have been logged on to Enterprise.");
     response.sendRedirect (redirectURL);
Thank You for your help

// Retrieve the parameters that the user entered into the logon fields.
<b> user name and password come from here from the above html form into the jsp here. Ted Is this what you are asking for where does the username and password come from
    String username = request.getParameter("user");
    String password = request.getParameter("pass");
</b>
    IEnterpriseSession enterpriseSession = null;
    Exception failure = null;
    boolean loggedIn = true;
     String redirectURL = null;
     ISessionMgr sessionMgr = null;
     // If no session already exists, logon using the specified parameters.
    if (enterpriseSession == null){
        try{
            // Attempt logon. Create an Enterprise session manager object.
            sessionMgr = CrystalEnterprise.getSessionMgr();
            // Log on to BusinessObjects Enterprise
            enterpriseSession = sessionMgr.logon(username, password, "appserver.abc.com", "secEnterprise");
               System.out.println("line61");
        }catch (Exception error){
            loggedIn = false;
            failure = error;
        if (!loggedIn){
            // If the login failed, redirect the user to the start page.
            return;
        }else{ this code is in my first post

Similar Messages

  • Is it possible to communicate with two different devices using two seperate serial ports in the same labview program?

    The two bits of the program will talk to each instrument successfully if the other part of the program is not running. i do not need them to communicte with both serial ports at the exact same time, just within the same program, one after the other. i am using labview 6. any ideas of what i could be doing wrong?

    Hello,
    If you are using the Legacy serial VIs, you should really switch to the VISA VIs. Also make sure you are opening a session to each of the com ports at the beginning of the program and closing each at the end of the program. Problems can arise if your try to open a session to a port that already has a session open. Also you should update LabVIEW to 6.0.2
    If you are still having problems post the error code and error message you are getting.
    Ray K
    NI Applications Engineer

  • I am using Windows 8 with iTunes.  How do I manage iTunes with two different Windows User Accounts?

    I have recently bought a laptop running Windows 8 and downloaded iTunes.  I subscribe to iTunes Match and have a large amount of purchased music and imported CDs, along with some films purchased from iTunes.
    I have downloaded all of the music and the films to the laptop using iTunes Match when logged in under my User Account in Windows 8.  However, when we switch to my girlfriend's User Account, she can load up iTunes but all the music and films have the cloud symbol on them indicating that they need to be downloaded
    Is is necessary to download everything to the computer twice (I can't really believe this is the answer) or are we missing something in terms of using iTunes with two different User Accounts?
    Thank you.

    Step 1
    Create a new user account on your device. For Mac users, choose “System Preferences” from the Apple Menu and navigate to the “View” menu. Click on “Accounts” and select the “+” button to add a new user account to your machine. Edit the user information and grant any relevant privileges by following the on-screen prompts.
    For Windows users, click on the Windows "Start" button, select “Control Panel” and choose “Add or Remove User Accounts.” A new window will open. Click “Create a New Account.” Name the account and set any relevant privileges by following the on-screen prompts.
    Step 2
    Sign in to the new user account you created.
    Step 3
    Open iTunes and click “Sign in.” Enter your Apple ID and password and log in.
    Step 4
    Download purchases through the iTunes store. All files related to these purchases are stored under the separate user account, thus separating both iTunes accounts and their libraries on the same computer.
    Step 5
    You can share music from both libraries by dragging your music library to a publicly accessible location on your computer. Click “Preferences” from the iTunes menu and deselect “Copy files to iTunes Media Library when adding to library file.” Add the shared folder to your library from the “File” menu.
    Tip
    Create more than one library from the same user account by deselecting “Copy files to iTunes Media Library when adding to library file” from the “Preferences” menu. Add the files you want to iTunes by dragging and dropping or by opening from the “File” menu and sync your device to that library. Quit iTunes after the sync and reopen iTunes while holding the "Shift" key in Windows or the "Option" key on a Mac.
    (tour du lịch nước ngoài)

  • One Material with two Different In-House Production Days

    Dear Experts,
    We have 1 semi-finished material (HALB) that is common to two different locations (production version) with two different in-house Production days.  How can we separate the 2 different in- house prod. days for this specific material? Could we setup in the production version? if not, could you give us an advice.
    Ex:
    JDXZ011111 with Prod. version I000 = 3 days
    JDXZ011111 with Prod. version X000 = 1 day
    We are hoping for your help..
    Thank you.
    Regards,
    Marnelli

    Dear Mamelli,
    1.You cannot maintain  the in-house production time in the production version.
    2.In-house production time in days can be maintained in MRP2 view.
    3.If Lead time scheduling is carried out at the time of MRP run then the system uses the in-house time for the calcualtion onf basic
    start and end dates.Based on the routing data the system proposes the production start and end time.
    4.Generally exception messages 64     Production finish after order finish
    63     Production start before order start are  shown after MRP run.
    5.If basic scheduling is carried out then the system proposes only the basic dates.
    Regards
    S Mangalraj

  • Set up itunes account with two different credit cards

    Is it possible to set up an existing iTunes Store Account with two different credit cards?
    I am currently registered with a personal card but wish to make one purchase for work (Lion OS) using a company credit card.
    many other sites let you choose what card to pay from, multiple addresses, etc. but I don't see any options from apple site.
    for this purchase I am considering:
    1. going into the "edit payment information".
    2. editing all the info related to the company card and address.
    3. completing the purchase and download
    4. going back to the payment info and putting back my original personal informaton.
    there must be an easier way -- or is this the only apple offering.
    any advice appeciated. TIA.

    the_0ne wrote:
    but this discussion is clearly for people that have multiple accounts because they have multiple credit cards.
    This is incorrect.
    It is very clearly for people with a single iTunes account and they want to use multiple credit cards for purchases on that single iTunes account.
    If I had one iTunes account with multiple credit cards registered (which again, is what this discussion is in reference to),
    Huh? You just wrote it was NOT that.
    I bought Lion through my company, which means I logged into the App Store with my company's credentials, of which I have my company credit card registered.
    You mean your company paid for it. You are simply the one who did the purchasing using company funds.
    I now have a new iMac of which I want to install Lion.  Apple allows you to install this same install multiple times on your own personal machines.  I had to remember which account I bought Lion on so that I logged into the App Store correctly.  If I would have logged into my new iMac with my personal account, I would have then bought Lion again, of which I didn't want to do.
    But you did not purchase Lion with your personal account. It was purchased on your business account.
    If you want Lion on your persona/home computers, you will need to purchase it.
    I also wanted to install iPhoto.  I bought iPhoto on my personal account.  I had to then log out of the app store from my company account and log back in using my personal account to install iPhoto or I would have just bought iPhoto with my company's credit card, of which I would have been in a good amount of trouble.
    Imagine if I bought 3 or 4 apps a week and these apps were scattered across my business account and my personal account.  Each time I wanted to install these apps on one of my multiple machines in my  house, I would have to remember which account I bought the app on. or go to my purchases or which there could possibly be dozens of apps in each account.
    I would hope that your company requires you to track purchases you have made with their money.
    And I would think that you would want to keep track of all business purchases so you can get reimbursed (for the purchases you made on their behalf). If/when you leave the company, they can get company owned software that you purchased with their funds.

  • How do I sync two ipods with two different IDs on the same computer?

    How do I sync two ipods with two different IDs on the same computer?

    Simply connect them.  One computer with one iTunes can manage multiple devices.  They're tracked by S/N but you might wish to assign them unique names so that you can track them yourself.
    The only minor issue is app updating and purchases while on the computer.  It's necessary to log out and back in to the "correct" ID.  Much easier to do these things from the iPods.

  • Vendor open item amount to settle with two different banks  in F110.

    Hi
    Actually client requirement is one vendor line item to settle two different banks. Is there possible in APP program TC F110?
    How we can configure and how to settle one line item with two different banks in APP program.
    Please give me suggestions as soon as possible.
    Venkatesh
    Edited by: vdd08381 on Nov 5, 2011 1:19 PM
    Edited by: vdd08381 on Nov 5, 2011 1:20 PM

    Hi,
    Actually client requirement to work on one line item to settle two different banks.
    Once we have done partial payment to vendor can not give to cheque to vendors. My point view this is not possible.
    Is there any option please post the customization?
    Venkatesh
    Edited by: vdd08381 on Nov 7, 2011 5:36 AM

  • Split valuation for  material with two different price indicator S and V

    Hello Gurus,
    Is it possible to maintain split valuation for same material with two different price indicator S and V.
    For Ex. Material A is manufactured can be manufactured in house ,  procured from outside vendor and can be purchased from subcontracting vendor by providing raw material.
    We want to keep  Price control V for same material " A"  which is procured from outside vendor.
    And price control S for inhouse produced same material " A".
    Besically this material is semifinished and having BOM for subcontracting.
    Please advice.

    Hi
    When the material is split valuated, you maintain the accounting view for the material 1st with valuation category, here the price control should be V.
    When you will extend the material to valuation type "Inhouse mfgd" maintain the price control as S, for valuation type "Procured form outside vendor" maintain it as V.
    Regards
    Prasad

  • Sales Deal with two different validation dates for the same material

    Hi SAPers,
    I am trying to create a u201CSales Dealu201D VB31, for the same material/condition, but with two different validation dates. After the creation of the first record, I select u201CNew conditionu201D button, but the system give me the message VK104, u201Cthe condition is being processed in the current session.u201D.
    How can I solve this issue?
    Thanks in advance.
    Pedro

    We can't have multiple records for the same condition and key values valid on the same date. The condition end date is part of the primary key in the database table. The date ranges between the records cannot overlap. When you create a new record, usually the end date is set to 12/31/9999 by default. If you need to have this deal to end on a different date and a new deal to start afterwards, then first you need to change 12/31/9999 to a different date.
    Also usually I try to exit the screen between the transactions.

  • Can a real Server be applied in two different server farms associated with two different VIP IP and TCP Port

    Good day everyone,
    I have a question in regard to real server operation with different server farms, and VIPs
    Can a Real Server be associated ( for simpliciy) with two different Server Farms that have a VIP associated with each, servicing the same TCP Port (443).
    Example:
    SF-A
    RSRV-1: 192.168.1.10 /24
    RSRV-2: 192.168.1.11 /24
    VIP-A: 192.168.1.20 /24
    VIP-A: https:web-A
    Protocol: HTTPS
    SF-B
    RSRV-2: 192.168.1.11 /24
    RSRV-3: 192.168.1.12 /24
    VIP-B: 192.168.1.30 /24
    VIP-b: https:web-B
    Protocol: HTTPS
    Client-A: 172.16.128.10
    Client-B: 172.16.128.15
    I have attached an sketch depicting the connectivity.
    As always any feedback/Suggestions will be greatly apprecaited.
    Cheers,
    Raman Azizian

    Raman,
    This type of config is no problem. What the server is doing is virtual web hosting. The server would have two different web services running for the same IP, but each listening for a unique host header.
    From an IP point of view both connections would be destined to the rserver address on port 80, but in the http header they would have two different Host headers.
    one for www.example1.com and the second for www.example2.com. If the web server is configured correct so each host name is tied to one web service it will not have any issues.
    The config you attached looks ok. The way you have the sticky group is ok doing source IP. If you use cookies for the sticky group I would suggest you create two sticky groups each with a different cookie name and add the same serverfarm to both groups. The client will only send a cookie for the domain it received it from so using the same cookie in two vips could cause problems if the same client hits both vips.
    Hope that helps
    Regards
    Jim

  • Using a ipod with two different computers...

    I just bought a new laptop and had to download itunes again but when i hook up my ipod it tells me that that ipod is already synced with another computer (my main desktop comp.). Is there a way to use my ipod with two different computers, or can you just use one computer at a time?
    thanks!
    Dell Inspiron 1505   Windows XP  

    You can use more than one computer, but you'll have to load your iPod MANUALLY if you do, otherwise it will keep erasing things to match the library it's hooked up to.
    http://docs.info.apple.com/article.html?artnum=304711

  • Using Berkeley With Two Different Environment Simultaneously

    I am trying to use Berkeley with two different environment simultaneously in one program. But I am getting an error message of Databases left open. The first environment close with no error but the 2nd environment, having an error like this,
    Exception in thread "main" java.lang.IllegalStateException: Unclosed Database: element_primary_key_index\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Unclosed Database: class_catalog\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Unclosed Database: element_database\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Databases left open: 3
         at com.sleepycat.je.Environment.close(Environment.java:383)
         at com.svi.tools.gfs3v10domain.database.GFS3v10ReadWriteDatabase.closeUpload(GFS3v10ReadWriteDatabase.java:155)
         at com.svi.tools.gfs3v10domain.GFS3v10Domain.closeReadWrite(GFS3v10Domain.java:160)
         at com.svi.tools.gfs3v10.util.GFS3v10UploadUtil.closeUpload(GFS3v10UploadUtil.java:97)
         at com.svi.tools.gfs3v10.GFS3v10.closeUpload(GFS3v10.java:115)
         at com.svi.tools.gfs3v10uploader.util.Uploader.uploadFiles(Uploader.java:89)
         at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.mainMethod(GFS3v10Uploader.java:109)
         at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.main(GFS3v10Uploader.java:52)
    Please someone help me with my problem. Thanks in advance.

    Hi Mark,
    Here is my sample program for the problem:
    import java.io.File;
    import com.sleepycat.bind.serial.StoredClassCatalog;
    import com.sleepycat.je.Database;
    import com.sleepycat.je.DatabaseConfig;
    import com.sleepycat.je.Environment;
    import com.sleepycat.je.EnvironmentConfig;
    import com.sleepycat.je.EnvironmentLockedException;
    import com.sleepycat.je.SecondaryConfig;
    import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementData;
    import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementKey;
    import com.svi.tools.gfs3v10domain.views.utils.ElementByPrimaryKeyCreator;
    * Read Write Database used for every thing else.
    public class MethodsSample implements GFS3v10Database {
         * Environment where the Database resides.
         private Environment environment = null;
         private boolean isClose = false;
         String environmentString;
         * Class Catalog for Stored Classes.
         private static StoredClassCatalog classCatalog;
         * Element Database.
         private static Database elementDatabase;
         * Element Database by Primary Key.
         private static Database elementByPrimaryKeyDatabase;
         private static Database catalogDatabase;
         * Default Constructor.
         public MethodsSample() {
    * Alternate Constructor.
    * @param homeDirectory Location where the Database is Located.
    public MethodsSample(String homeDirectory) {
         environmentString = homeDirectory;
         openEnvironment(homeDirectory);
         openDatabase();
    @Override
         * Opens the Read Write Database.
         * @param homeDirectory Location where the Database is Located.
    public void openEnvironment(String homeDirectory) {
         EnvironmentConfig environmentConfig = new EnvironmentConfig();
    environmentConfig.setTransactional(true);
    environmentConfig.setAllowCreate(true);
    environmentConfig.setDurability(DURABILITY);
    while (environment == null) {
         try {
              environment = new Environment(new File(homeDirectory), environmentConfig);
         } catch(EnvironmentLockedException ele) {
              try {
                             Thread.sleep(500);
                        } catch (InterruptedException e) {
    @Override
         * Opens the Database.
    public void openDatabase() {
         DatabaseConfig databaseConfig = new DatabaseConfig();
         databaseConfig.setDeferredWrite(true);
    databaseConfig.setAllowCreate(true);
    catalogDatabase = environment.openDatabase(null, CLASS_CATALOG + environmentString, databaseConfig);
    classCatalog = new StoredClassCatalog(catalogDatabase);
    elementDatabase = environment.openDatabase(null, ELEMENT_DATABASE + environmentString, databaseConfig);
    SecondaryConfig secondaryConfig = new SecondaryConfig();
    secondaryConfig.setDeferredWrite(true);
    secondaryConfig.setAllowCreate(true);
    secondaryConfig.setSortedDuplicates(true);
    secondaryConfig.setKeyCreator(new ElementByPrimaryKeyCreator(classCatalog, GFS3v10DomainElementKey.class, GFS3v10DomainElementData.class, String.class));
    elementByPrimaryKeyDatabase = environment.openSecondaryDatabase(null, ELEMENT_PRIMARY_KEY_INDEX + environmentString, elementDatabase, secondaryConfig);
    @Override
         * Gets the Environment.
         * @return Environment.
    public Environment getEnvironment() {
         return environment;
    @Override
         * Gets the Class Catalog.
         * @return Class Catalog.
    public StoredClassCatalog getClassCatalog() {
         return classCatalog;
    @Override
         * Gets Element Database.
         * @return Element Database.
    public Database getElementDatabase() {
         return elementDatabase;
    @Override
         * Gets Element By Primary Key Database.
         * @return Element By Primary Key Database.
    public Database getElementByPrimaryKeyDatabase() {
         return elementByPrimaryKeyDatabase;
    @Override
         * Closes Database and then Environment.
    public void closeUpload() {
         System.out.println("1st Jar environment closing = " + environmentString);
         elementByPrimaryKeyDatabase.close();
         elementDatabase.close();
         classCatalog.close();
         catalogDatabase.close();
         environment.close();
         isClose = true;
    public Boolean isClose() {
         return isClose;
         @Override
         public void closeOthers() {
    for the Main:
    public class sample {
         public static void main(String[] args) {
              String environment1 = "\\\\192.168.160.184\\glassfish\\berkeley\\environment\\home\\Multiple\\Testing11";
              String environment2 = "\\\\192.168.150.211\\glassfish3\\Berkeley\\environment\\Testing11";
              openCloseEnvironment(environment1, environment2);
         public static void openCloseEnvironment(String environment1, String environment2) {
              MethodsSample forEnvironment1 = new MethodsSample(environment1); //Opens the Databases
              MethodsSample forEnvironment2 = new MethodsSample(environment2); //Opens the Databases
              forEnvironment1.closeUpload();
              forEnvironment2.closeUpload();
    // same error happens no matter what sequence for closing
    Thank you.

  • How to enter invoice with two different tax codes in one line?

    Dear friends,
    I have this PO for which I enter the invoice.
    I recieve later a subsequent debit for this PO from the transporter. This subsequent invoice has got extra debits, one with 21% VAT and one with 19% VAT, which means two items with two different tax codes.
    I want to enter this subsequent debit for each item of the PO, and I want to enter both debits in every item of the PO.
    How can I enter in one row in MIRO a debit with two different tax codes.
    Thank you.

    I want in the same line item to enter two tax codes.
    Do you Know if there is any way to do this?
    It is a subsequent debit and it has two items with two different tax codes. I want to enter the subsequent debit for a PO with many items and enter the value of the whole subsequent invoice. So there is the need to enter one line item with two tax codes.
    How can this be done?
    Thank you?

  • I need to upgrade memory slots on my Mac mid 2010 up to 4 GB module which is currently 2GB with two different 1GB memory  slots.Is it compatible and would like to know about the cost?

    I need to upgrade memory slots on my Mac mid 2010 up to 4 GB module which is currently 2GB with two different 1GB memory  slots.Is it compatible and would like to know about the cost?

    this sub forum is about running windows on macs maybe you should try
    https://discussions.apple.com/community/notebooks/macbook

  • One MIRO document with two different vendors for two different line items

    Can it possible to make MIRO for a PO which is having two conditions(Basic price+Freight) with two different vendors.
    MIRO document needs:
    GR/IR Clearing    Dr.
    Freight Clearing  Dr.
    Vendor RM(X)         Cr.
    Vendor Freight(Y)   Cr.
    Is it possible to post the above document at a time not individually for each condition.

    Hi,
    Yes, It is possible to post Material and delivery cost in one document.where in material supplier is different than the Frieght vendor.
    Itm PK  BusA Acct no.   Description                    Tx     Amount in   USD   
    001 89       130001     Stock-Ingredients               244 0            880.00 
    002 96       320001     GR/IR Account - Ing.            244 0          1,200.00-
    003 86       520002     Ingredients - PPV               244 0          3,297.87 
    004 50       320008     GR/IR Account - Duty            244 0            797.87-
    005 50       320009     GR/IR Account - Fre.            244 0          2,180.00-
    Thanks
    Dinabandhu

Maybe you are looking for