Getting attributes from session between two different applications

I'm developing with JDK 1.3 and deploying my webapp at ORACLE 9iAS.
I would like to jump between JSPs deployed at differents OC4J instances and
keep session object. I've seen I can get sessionID and it's the same but the attributes have disapeared.
I jump using JavaScript code (document.location.href).
Should I use a <form> ?
Should I use getServletContext() method ?
I dont know even if it's possible and I don't want to loose my time looking for a solution that doesn't exist.
THANX in advance
PS..- I have already look for in this forum but I didn't get any info to solve my doubts. If I mistaken please let me know

getServletContext().getContext() may return null in 'security conscious' servers. Apparently this is your case, therefore you wouldn't be able to use it to store global data...
As for sharing sessions directly between different web apps, the servlet spec (since 2.2 at least) explicitely prohibits it.
The link provided by tolmank about pseudo-sessions should address your issue, since it will allow you to distribute your session data on your different webapps.
Some other alternatives would be :
-store the session data in the DB (slow)
-use java serialization
-use RMI
-use JNDI
-if you're using Tomcat, you can implement single-signon accross multiple apps using cookies :

Similar Messages

  • Problem: Sharing session between two different Web browser & Web Appn'

    I�m facing a strange scenario here and would appreciate any inputs which could resolve this issue.
    I have two webapplications (EAR�s) on two different machine and different WebSphere application server. I have �WebAppA� [on machine A, WAS A] which opens in parent window and expects to pass some info in the FORM submission with request parameter to �WebAppB� [on machine B, WAS B] which opens in a child window browser on clicking submit button from �WebAppA�.
    Now the WebAppA is required to wait till the response come from WebAppB after certain functionality and once the function of retrieval is over by WebAppB, it sent back the response data back to WebAppA FORM, which finally submits this form after getting the response data from WebAppB. Now the response to WebAppA [which is in machine A, WAS A] from WebAppB is a pure POST request on complete URL and set of request parameters with values.
    Now what is happening is that, when a User A fills the form on WebAppA and submits the data to WebAppB, on response it gets the data of some other User request, for example day of UserB or UserC.
    Now when I do the test on my development environment, where its just me or some other 2-3 users accessing it I don�t face any problem. I get the response for the request I have submitted�.PERFECT. On production I have issue where users are getting data as response of other users.
    I suspect since the response is submitted to the form page of WebAppA its unable to synchronize to which user it belongs to. May be that�s the reason when I test it on development with single or 2-3 users its behaving fine. I hope I could put my question properly to you. I don�t know what can resolve this or what is the actual cause? Is there a proper way to implement this? Please any suggestion or inputs are appreciated.

    Thanks Amittev,
    That's the problem for me. Actually this is a part of integration with third party application (which is loaded in child window - WebAppB). So as per the functionality there is no reference or trace of the user in the parent window at first instance. Anyone can come to parent window and initiatate a process. Its only when the data comes back from child window (which is the WebAppB), that parent window application (WebAppA) take the response and proceed further. Now here is what I'm facing problem. the user who initiated the process by clicking on the submit buttom of Parent window is not getting his response, but of some other user. This is not happening with every user and at all time. But were sparingly and rarely, but enough to bring headache to our department now.
    Now I suspect that, since there is a parent/child browser functionality here the session which is started by parent is not synced with child where the WebAppB is loaded and responds the response to WebAppA. The WebAppB makes a POST request submission to the WebAppA thru the child window and the session here is missing synchronization, I believe. I will appreciate some inputs and resolution to this problem. Thanks.

  • Drag and Drop Swing Components between two different Application Windows

    I tried the Dnd feature using the DnD api. It was a simple test, where I ahd two different app windows each made up of a JLabel. One I registered as drag component and the other as a drop component. the drop componenet(JLabel) does not have any text making it invisble to the eyes. When I drag the other JLabel to the drop window, the drop JLAbel takes the text value. I was successful so far.
    But can I do the same for any other Swing component in a scenario where when I drag the component, the component should have physically moved into the other window.
    any help on this with sample code will be greatly apprciated.
    Thanks in advance

    Ok I found the answer to your problem. If you download the tutorial they have the code there it's in one folder. I hope this helps.

  • Getting difference from values of two different SQL Statements

    I have two SQL Queries like the following:
    1. Statement:
    SELECT name, SUM(a1), SUM(b1),SUM(c1),SUM(d1)
    FROM table 1, table 2
    WHERE ...
    GROUP BY name
    2. Statement:
    SELECT name, SUM(a2), SUM(b2),SUM(c2),SUM(d2)
    FROM table 3, table 4
    WHERE ...
    GROUP BY name
    I need now a combination of these SQL Statements in one Statement where the result should be the following records
    name, a1-a2 as a, b1-b2 as b, c1-c2 as c, d1-d2 as d
    Name is a VARCHAR and in both queries the values of the field name are the same
    all other fields are integer.
    I hope someone can help me.

    You can use this
    with t1 as (
              SELECT name, SUM(a1) as a1, SUM(b1) as b1,SUM(c1) as c1,SUM(d1) as d1
              FROM table 1, table 2
              WHERE ...
              GROUP BY name
         ), t2 as (
              SELECT name, SUM(a2) as a2, SUM(b2) as b2,SUM(c2) as c2,SUM(d2) as d2
              FROM table 3, table 4
              WHERE ...
              GROUP BY name     
         ), tt as (
              select name
              from t1
              select name
              from t2
    select *
    from tt
         natural left outer join t1
         natural left outer join t2
    where a1 <> a2
         or b1 <> b2
         or c1 <> c2
         or d1 <> d2Bye Alessandro

  • How can I interact between two different frames in the same indesign template as well as from one template to another.

    I am looking for the best way (or any way) to interact between two different frames in the same indesign template as well as from one template to another. It's for a DPS app which needs to carry some button initiated data from one page to another and then present it in a table.

    There is no simple way to do it, as itunes wont let you use it on another computer without wiping the contents first.
    However if you really want to transfer songs to another computer then you could try this;
    * make sure that your ipod is accessible as a disk drive (ipod options)
    * when you plug your ipod into the computer you want to transfer to make sure you select "no" or "cancel" when it asks to wipe the contents. Leave the ipod connected and quit from itunes.
    * go to "my computer" and access the ipod directly. You probably have to select "view hidden files" from windows. You will see a lot of folders with odd names like ZX838aff with similar named files inside.
    * copy these files to a folder on your computers hardrive. Now remove the ipod and start itunes.
    * import the files from the folder you made in the last step.
    * Now your music is on itunes, but with unrecogisable names.
    This is the only way I have found to do it, but there may be another way, say with an application to do the hard work for you.
    Generic homebuild PC Windows XP
    Generic homebuild PC   Windows XP  

  • Use of SAP memory to transfer data between two different sessions.

    Hello experts,
    I wish to know how to use SAP memory to transfer data between two different sessions.
    The scenario is that when I run a report and change a variable, the value of changed variable should be availabe to another user on another terminal.
    Thanks & Regards!

    Just to add what Max has already mentioned. IMPORT TO / EXPORT FROM DATABASE statements can be used to store data in special "cluster" tables (you can't use any DDIC table) e.g., INDX.
    @OP: You can opt for Shared Memory(SHM) for this specific requirement as well. In my opinion SHM is a bit tricky to code, but it is easier to monitor. The opposite holds true for "data clusters".
    You should remember SHM is app-server specific. So if you've a load balancing scenario, using SHM can cause problems.
    Hope i'm clear.
    Edited by: Suhas Saha on Nov 19, 2010 4:12 PM

  • One instance for two different application

    I have to solve following problem..
    need have one instance of object for two different application..fist is standard SE application and second is EE (web)..
    SE application is a server..listen on and accepting connection from mobile phone..and EE application need to show list of connected devices and should say to SE application that new device was connected..
    I would like to do this without database..only server and web app..
    I have thought about RMI..but hope there is more simple solution..
    Thanks a lot for your ideas.

    I would like to do this without database..only server and web app..You have your reasons for wanting this to be the case. If you are sure you don't want a DB, then pass the state of the object between the two ends using XML as the transport form. As someone said, you can use JMS or you can write an HTTP POST or probably other transport mechanisms other people will suggest to actually get it over the wire from one side to the other.
    As to your question of how to sync state, just make the object you're sharing final after it's been created (on the side that creates it) and make the reference that receives it and holds it final also, after you've reconstructed it from the XML you received.

  • Authentication needed after doing trust between two different domains.

    Hi There,
    I have a problem when i did the trust relationship between two different domains in two different forests ,,in the trust relationship steps all working two ways trust,with external trust,stub zone created on both domains and they are validated in both sides
    ,,my problem is with the objects it can't be retrieved from side and it can be from the other side . For instance :
    NY domain can get the users and computers of 2012DC1 
    but 2012DC1 can't get the users and computers of NY
    Date and time are the same,i am always getting this error 
    The session setup from computer '2012DC1' failed because the security database does not contain a trust account '' referenced by the specified computer.  
    If this is the first occurrence of this event for the specified computer and account, this may be a transient issue that doesn't require any action at this time.  If this is a Read-Only Domain Controller and '' is a legitimate machine account
    for the computer '2012DC1' then '2012DC1' should be marked cacheable for this location if appropriate or otherwise ensure connectivity to a domain controller  capable of servicing the request (for example a writable domain controller).  Otherwise,
    the following steps may be taken to resolve this problem:  
    If '' is a legitimate machine account for the computer '2012DC1', then '2012DC1' should be rejoined to the domain.  
    If '' is a legitimate interdomain trust account, then the trust should be recreated.  
    Otherwise, assuming that '' is not a legitimate account, the following action should be taken on '2012DC1':  
    If '2012DC1' is a Domain Controller, then the trust associated with '' should be deleted.  
    If '2012DC1' is not a Domain Controller, it should be disjoined from the domain.
    Can you please help me in this error.
    Thank You in advance.

    "The session setup from computer '2012DC1' failed because the security database does not contain a trust account '' referenced by the specified computer. "
    This belongs to the machine 2012Dc1 in and not to the other domain from your trust. Seems for me that you mix the trust with the problems of the machine 2012DC1 in
    In this error message 2012DC1 has lost the trust to its OWN domain and therefore you have to find the reason. How exactly was this machine installed?
    Or was there a restore on that machine from not supported type of backup like image/clone/snapshot?
    Best regards
    Meinolf Weber
    Microsoft MVP - Directory Services
    My Blog:
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.

  • How to Persis session between two ear files

    Can anybody tell me how to persists session between two ear files?
    Please Help its urgent!!

    Rahul -- there's nothing as a J2EE spec requirement or even a proprietary feature of OC4J/OracleAS which will enable this.
    If you have two different EAR files, then they are two different applications, and each will have their own session which can't be shared amongst each other.
    If you have data which needs to be shared across different applications then you could either put it on a shared file system or write it to a database which you can then read from in the other application.
    One way to do this is to implement the HttpSessionAttributeListener interface which will be called when object are added/removed/updated from a session, and then make a determination on whether the new object needs to be stored in a common place to facilitate sharing between applications.
    This is more likely to be a hackaround and ideally you'd examine why you want to share session state across applications and rearchitect so you don't need to do it -- but if you want to try a solution without a major revisiting of the whole application, then perhaps it's an option.

  • I would like the share an iTunes library between two different accounts on one Mac. How do I do this?

    iTunes no longer works properly (aka at all) while using one of the user accounts set up on my iMac. It does, however, work when logging in under another user account on the same iMac. (if any of you can help me solve this issue that would be perfect). If there is no solution can anyone help with my request to share an iTunes library between two different accounts on one Mac. How do I do this?

    jc_hering wrote:
    that works for anything he purchases after he creates the new account.  What about his current music that currently resides in my itunes library?  How can I get his current music out of my library into his new account/library??  Thanks..
    Copy it to his computer into his iTunes library and authorize his computer with the iTunes account used to purchase them..
    You cannot tranfser items from one iTunes account to another. Purchased items remain part of the iTunes account is was purchased with.
    iTunes account - used to purchase items
    iTunes library - where purchases (and CD RIPs) go on the computer

  • How to transfer app data between two different game center accounts?

    Hello, I really need some help.
    I have looked all over the web for ways to transfer apps between two different game center accounts and different devices. Several weeks ago I started playing Campus Life on my relative's Ipad 2, therefore spending many long hours to get to this point in the game.
    The problem is I just got an Iphone 5 and I really would like to transfer the data onto it, so that I would not need to start all over again.
    My grandma has an account (Game Center) onto which the data has been saved and I would like to have it stored onto mine. On some forum someone said to sign into the account which has the data on both devices and to then open up the game on the new device. It worked. Then I signed out and logged in with my own account- the game started from scratch. I panicked. I went back on the other account, and the data reappeared. I have been going back and forth, the game changing as many times. I thought it would ask to back up my grandma's data on mine but I was wrong. I can not seem to save the game onto my new account, and I have even tried to back it up to Itunes and then copy it onto my phone after having signed into my own account. And I don't know how to properly use Icloud. I am a mess. I am completely lost and have found no help on the web. (All people seem to have to deal with is sharing Apple IDs with different Game Center Accounts for the kids and transferring apps from one of their devices to another.)
    I am so worried I am going to mess up and will lose the whole thing completely.
    I have just started another game with my own account but since I am using my grandma's, the data is erased. It's one or the other but I definitely prefer saving Campus Life. I do not like the idea of having to only pick one.
    I do not know any technical terms, so if you understand or even have the slightest clue about what I am talking about, I applaud you.
    This seems like mission impossible, so if anyone can help in any way, I would be really grateful. 
    Thanks in advance for your time and thoughts!

    I meant to press on "This solved my question"... Sorry if you needed the points.
    Thank-you and I will just go back and forth between the accounts.

  • How to route traffic between two different interfaces

    I need to setup a routing between two different interfaces on a host.
    Inferface ce1 :
    Inteface ce2 :
    Is it possible to add a route which enables the ce2 interface to catch packets from the ce1 interface ?

    The problem is a application which is only able to listen on one interface.
    To fix this, I have to make all packages visible on one interface.

  • How can I get extract the data between two cursors on an XY graph

    How can I get extract the data between two cursors on an XY graph

    Well, you say xy graph, so this might be a more complicated problem.
    For a waveform graph it's trivial. Simply get the two cursor indices (property: cursor index) and apply them to array subset of the data. Is that all you need?
    Here's how the above code would look like. using cursor.index instead of cursor.x elimnates the need to include scaling information.
    For an xy graph, there could be multiple segments (e.g. imagine a spiral that passes the desired x range multiple times from both sides). This would neeed significantly more code for a general solution.
    Message Edited by altenbach on 11-24-2009 07:53 AM
    LabVIEW Champion . Do more with less code and in less time .
    cursorsubset.png ‏17 KB

  • How can i get number of days between two dates represented by two dates?

    how can i get number of days between two dates represented by two date objects. One is java.sql.Date, the other is java.util.Date?

    tej_222 wrote:
    But how do I do that conversion. from and to calender?
    -thanks for the quick response.You may find the following utility code samples useful:
    ganeshmb wrote:
    (date1.getTime() - date2.getTime())/(1000*60*60*24) should do.
    getTime returns millsecond value of date object and the difference divided by no of milliseconds in a day should fetch you the difference in terms of days.This doesn't respect the DST. Use java.util.Calendar.

  • HT204053 Is it possible to sync calendars between two different users?

    Is it possible to sync calendars between two different users?

    Installing the drive into the older machine may work, you WILL get a lot of driver errors and the unit may even fail to boot. The other problem is that the drives may not be compatable, the drive in the broken PC is a SATA drive, older PCs had IDE drives with very different connectors.
    Your best option is to do as you suggest and obtain a USB caddy and extract the data that way.
    Make sure that the caddy you get will support SATA drives (all new ones will).
    Although I am an HP Employee, all views expressed are my own and are not on behalf of HP
    **Click Accept as Solution on a Reply that solves your issue to help others who are searching**

Maybe you are looking for

  • Save files as PNG to original folder, using droplets in Photoshop CC 2014

    I want to save RAW images from Lightroom as PNG and found a method online that involves using a droplet in PS. I created this droplet with an action in PS that involves saving an image file as a PNG, to a folder which I call 'PNG files'. To get a PNG

  • How to use query in sap tm?

    I have tried to call the query method using service manager instance as shown below CALL METHOD lr_srv_mgr->query      EXPORTING        iv_query_key            = zif_viv_trq_c=>sc_query-root-test_query *     it_filter_key           = lt_filter       

  • HT5882 How to take screen shot on iphone 5s?

    How to take screen shot on iphone 5s?

  • Where is the ctrl  f function now on iPad in safari?

    Where is the ctrl + f function now on iPad in safari?

  • SSIS error

    Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E05.  An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server 2012 Analysis Services."  Hresult: 0x00000001  Description: "Erro