How to share session object between multiple WAR's

I am Using servlet 2.3 & websphere 5.1 application server. I am using multiple war applications in my ear and i am able to share context-attributes & session attributes between wars. Can any one guide me how i can share session object?
I am getting session -time out in first war even though i am doing some operation's in second war. I want to maintian the same session, even in my second war which was created in my first war.
Can any one help me. Thanks in advance.

Hi LNL,
Can you explain more on singleton solution as you said....
For session attributes & context attributes i am using persistent storage to retrive them in multiple wars. My problem is how should i use "session object" in my second war which was created in my first war.

Similar Messages

  • Session sharing among multiple WAR files inside an EAR file

    Hi all,
    Is there a way where I can share my session object among multiple WAR files which are inside an EAR file?
    Please suggest.

    r035198x wrote:
    Some application servers (like Weblogic) allow to configure session sharing when you deploy the application.Sidenote: which is completely against the servlet spec.

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • How the hell does a person share session data between JSP page and a Servle

    1. How the hell does one share session data between a servlet and a JSP page without using a bean but rather using a normal string variable.
    2. When using session scope to access a bean the application complains about not finding the bean on the specified scope, however when I use an application scope the save the same bean, the application does find it.
    Please help!!!!!!!
    SERVLET:
    HttpSession session = request.getSession(true);
    ServletContext servletContext = session.getServletContext();
    customerID = result.getString("CustomerID");
    userName = result.getString("UserName");
    session.setAttribute("UserName",userName);
    session.setAttribute("CustomerID",customerID);
    System.out.println("Customer UserName = " + session.getAttribute("UserName"));
    response.sendRedirect("/economics/subscriptions/default.jsp");
    JSP PAGE:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root xmlns:jsp=http://java.sun.com/JSP/Page mlns:c="http://java.sun.com/jsp/jstl/core" xmlns:sql="http://java.sun.com/jsp/jstl/sql" version="2.0">
    <jsp:directive.page isThreadSafe="true" session="true" contentType="text/xml"/><jsp:output omit-xml-declaration="false"/><jsp:scriptlet>response.addHeader("x-xslt-nocache", "true");</jsp:scriptlet><pml>
    <page type="web" search="y">
         <pageName>Commercial Banking</pageName>
         <jsp:directive.include file="/economics/header.inc"/>
         <jsp:directive.include file="/login.inc"/>
         <jsp:directive.include file="/economics/leftMenu.inc"/>
         <!--<jsp:useBean id="UserName" type="java.lang.String" scope="session" />-->
         <content>
         <searchSum>Commercial - Main Content</searchSum>
         Value = <c:out value="${request.session.getAttribute("UserName")}"/>
         </content>
         <jsp:directive.include file="/economics/rightNav.inc"/>
         <jsp:directive.include file="/footer.inc"/>
    </page></pml></jsp:root>

    For a start, just "session" instead of "request.session" would work better. But why did you post this here and not in the JSP forum? Doesn't seem to have anything to do with Java programming.

  • How to share session beween 2 weblogic instance (451)

    Hi,
              I'm looking for the possibility to share session information between two
              weblogic instance (for weblogic 4.5.1).
              The first instance create and add information inside the session and store
              the session inside jndi for example.
              The second instance lookup the jndi to find all session informations and
              continue to work with this informations.
              If somebody have already do it, I'm intersted about tips and informations to
              do this fonctionnality.
              Thanks
              

    If the two server instances are in the same cluster, they automatically
              share session info!
              Gene Chuang
              Join Kiko.com!
              "Didier" <[email protected]> wrote in message
              news:[email protected]..
              > Hi,
              >
              > I'm looking for the possibility to share session information between two
              > weblogic instance (for weblogic 4.5.1).
              >
              > The first instance create and add information inside the session and store
              > the session inside jndi for example.
              > The second instance lookup the jndi to find all session informations and
              > continue to work with this informations.
              >
              > If somebody have already do it, I'm intersted about tips and informations
              to
              > do this fonctionnality.
              >
              > Thanks
              >
              >
              

  • How to use the 'Decision between multiple alternatives' Process variant

    Hi ,
    Can anyone tell me how to use the 'Decision between multiple alternatives' Process variant in BI 7 Process chains ?
    The requuirement is that I have a DSO eg DSO 1 from which i have to load DSO 2 and DSO 3 . Now if the number of Records in DSO 1 are < 100 i will load DSO 2 from DSO 1 else i will load DSO 3 from DSO 1 .
    So in the PC i have used a 'ABAP Program' variant (which counts the number of rows in DSO 1) after loading DSO 1 and  after this 'ABAP Program' Variant , i have used the 'Decision between multiple alternatives' Process variant. Problem is it is giving me only some some system fields in the formula , like sy-datum or sy-timlo , which are of no use here .
    It would be great if i can receive some help here .
    --Devraj

    in RSPC you create a ABAP processing type "ending with specific values".
    We use true or false for things as you specify.
    your abap program should return a true or a false to indicate which of the situations is applicable.
    Is this helpful?
    Marco

  • How to share the data between two or more frames

    How to share the data between two or more frames based on the database relationship in JDeveloper?

    You can pass data between frames by passing it as parameters.
    That is when you are invoking another frame, pass your data as arguments through the constructor to that frame .
    You can also achieve this through static or public methods, but static variables as we know is not suggested which might occupy more memory space.
    Regards,
    Srinivasan AShwath
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    How to share the data between two or more frames based on the database relationship in JDeveloper? <HR></BLOCKQUOTE>
    null

  • Session not shared between multiple wars, with no cookies

    I posted an earlier query on multiple wars in the same application.
    Actually session is maintained and getting shared on the server when
    browser supports cookies.
    When Browser does not support cookies i have the following problem,
    a) Without cookies URL's(href tags) work fine because they are bieng
    rewritten.
    b) The first form i call always has hidden tags with session id value
    and it works fine
    c) But in all susequent forms there is no hidden session id.(My forms
    are all JSP pages.).
    My questiona are
    1) under what situations does the server add session id hidden tags in
    html form.
    2)And how do I get them created automatically when browser does not
    support cookies.
    3) And why are the hidden tags being set for the first request. (I read
    in previous posts that is because the server does not know if browser
    supports cookies for first time) How does it know the second time. What
    html header gives this info.

    >
    1) under what situations does the server add session id hidden tags in
    html form.The webconnector should rewrite the sessionid whenever the browser might
    not support cookies. (And it has configured to allow URL re-writing.)
    Obviously you are having a problem with this, but based on the information
    you are providing I don't have any insight on why yet. Works for me. Try
    opening a support ticket and/or posting some more information.
    >
    2)And how do I get them created automatically when browser does not
    support cookies.This should happen automatically, unless you have changed the NoCookie
    setting in the registry.
    >
    3) And why are the hidden tags being set for the first request. (I read
    in previous posts that is because the server does not know if browser
    supports cookies for first time) How does it know the second time. What
    html header gives this info.Yes, hidden tags are set for the first request because the webconnector
    doesn't know if the browser supports cookies.
    The second request it knows that cookies are supported because the browser
    successfully has returned the cookie it sent the first time.
    David

  • Share session scope between war

    Hi all,
    I have more than two war inside ear.
    I like to share sessionscope between these war.
    any idea?
    With Regards,
    WP

    Hi,
    You can enable session sharing by adding the following to the <tt>weblogic-application.xml</tt> descriptor:
    <session-descriptor>
      <persistent-store-type>memory</persistent-store-type>
      <sharing-enabled>true</sharing-enabled>
    </session-descriptor>
    http://download.oracle.com/docs/cd/E21764_01/web.1111/e13712/sessions.htm#WBAPP308
    Dimitar

  • How can we share session information between browser and WebView

    Hi
    I have a web application which launches a instance of JavaFX web view on a click of a button. My issue is that when i launch this web view it creates a  new session of its own ,how can you transfer the session information of the parent (browser) to the web view.
    One of the solution i found was to add the JSESSION_ID cookie into the default(System-wide) cookie handler so it would override the existing cookie within the WebView cookiehandler.
    http headers - Setting a cookie using JavaFX&amp;#39;s WebEngine/WebView - Stack Overflow
    Are there any other solution for sharing session information between the web view instance and browser that launches it ?

    O.K. then, is it at least possible to access a wwsto_api_session
    from Java in the following way?
    Calling PL/SQL from Java
    JDBC and SQLJ allow you to call PL/SQL stored functions and
    procedures. For example, suppose you want to call the following
    stored function, which returns
    the balance of a specified bank account:
    FUNCTION balance (acct_id NUMBER) RETURN NUMBER IS
    acct_bal NUMBER;
    BEGIN
    SELECT bal INTO acct_bal FROM accts
    WHERE acct_no = acct_id;
    RETURN acct_bal;
    END;
    From a JDBC program, your call to the function balance might look
    like this:
    CallableStatement cstmt = conn.prepareCall("{? = CALL balance(?)}");
    cstmt.registerOutParameter(1, Types.FLOAT);
    cstmt.setInt(2, acctNo);
    cstmt.executeUpdate();
    float acctBal = cstmt.getFloat(1);

  • Criteria for dividing an application between multiple WARs

    What criteria are generally used when deciding on the division of a large application between several WAR files?
    I'd imagine that an eBay wouldn't put their entire web application into a single WAR. But I am unsure of what they would consider when deciding how they would split up their application.
    As each WAR file has its own context under the web server (is this correct?), I have the feeling from looking at a few tutorials (and seeing what's in the address bar) that it's to be split up by function (e.g. contexts paths for /register, /checkout, etc)
    Though the above doesn't seem like I'm interpreting their intentions or this concept correctly. If somebody could please help to explain the guidelines behind such a decision, that would be highly appreciated.
    Thank you for any explanation you can provide.

    bravebuddy wrote:
    Thanks for the reply. We are using cookies and all of the WAR files are under the same domain. The issue is when the user moves from a page in one WAR to a page in another WAR, the session data does not transfer with the user (the get a new session).Yes, I already understood the problem. Did you on your turn understood my answer "This is forbidden as per the Servlet specification" ?
    Is it correct to assume the only way to do this is to set up a persistence layer to hold basic session/user information that is accessible from all WARs and then use the common JSESSIONID that they all share (since they are under the same domain) as the Primary Key?It´s not the only way, but one of the ways, yes.

  • How to share security context between different application ?

    Hi all,
    I have two applications(ADF faces + BC, JDev 10.1.3.1) deployed into OAS 10.1.3.1.
    The two applications are :
    1) SalesApp -> main menu page = SalesMenu.jspx
    2) ReportApp -> main menu page = ReportMenu.jspx
    I want implement security using CustomLogin.
    The question is :
    How can I share security context between the applications ?
    What I mean is, from SalesMenu.jspx there is one menu item to jump into ReportMenu.jspx, and I want user no need to Login again, Login is once and the user is recognized in the two apps. How to achieve that ?
    Thank you for your help,
    xtanto

    Xtanto,
    actually you can't if these are separate J2EE application deployments. The session is not shared and thus the authentication is lost. I heard that OracleAs is planning to implement a feature that allows you to share the session and thus a context between two J2EE deployments. I am not 100 % sure this is the case and will check with OC4J Product Management
    Frank

  • How to Pass Java Objects between Web Dynpro and Java SAP iViews

    Basically I have an SAP web dynpro iView that I do stuff with and I want to pass an object to another iView which is just a regular Java iView. From what I've read and tried, I can't just stick something in the session object and hope that the Java iView can pull it down the other end. I had a dream that it was possible (seriously).
    Anyway, are there any possible solutions around? Please advice and share you throughts. I will try to dream about it again tonight and see if its really gonna work this time.
    thanks for your help in advance

    There is no easy way you can pass objects other than those supported by express such as String, map, list etc.
    Though not advised, you can create a class with static variables to handle the storage of such java objects during transition between form and workflow. You will need to somehow identify the objects uniquely .

  • How to use session object in windows application

    hi, I am programming in jdeveloper. i need to know that while i m making a web application i can use a session object for the particular session. now i m builiding a windows application for my final semester and i need to insert product id and then it should go to another frame and there it can store multiple information for a particular product id.
    e.g
    product id : 001
    next frame.
    filter name.
    filter position.
    when these are added then it should be able to add more filters for the same product id and i dont understand how to do that.
    Please let me know as i am lost and dont know how to proceed further. if some body wants to have a look on the codes he is most welcome.
    Waiting for an answer
    thank you

    Hi,
    in Swing applications you don't have a session object to store data. You can use a helper class though to act as a temporary memory. Just create a static class that has a hashtable method to add / read / remove data
    Frank

  • How to use session object in jsp

    hi all
    marry christmas
    can anyone plz tell me how to use session obect in jsp
    rachna
    Message was edited by:
    rachna_arora82

    hi rachna,
    JSP has a default(implicit) session object...... use the getSession(true) method on the session object and then going u can either get or set attributes depending on the requirement
    That was in general and now with the issue u have got..... what u can do is that the u can create session for every user who logs in and when he/she tries to login again then u can probably check for the existing session object in the JSP and perform the logic as required..... any clarifications plzzzzzzz let me know
    Thanks n Regards
    Naveen M
    Message was edited by:
    Novice_inJAVA
    Message was edited by:
    Novice_inJAVA

Maybe you are looking for

  • I want to set up Firefox to only allow certain pages to load - how do I do this?

    My children are having my old laptop and I dont want them to be able to 'stumble' across anything unsuitable. How can I set up Firefox so that it only allows pages to load from websites I choose? Thanx!

  • Hi, can I use my old hi-fi speakers with airplay? And will the quality still be good?

    Hello. I want to replace my old kitchen radio / CD. So I'm thinking of streaming my music. And then I wondered, will I be able to use my old hi-fi speakers? And will the quality be as good as my cds?

  • Full screen w/ cropping?

    I'm watching a video with 1024 height on my MacBook Pro, and it gets resized to the screens 900px height. However I set the preferences, the video will always display "fit to screen" instead of "original size". Is that a bug in QT 7.3.1 or is this ju

  • Percentage (%) in report

    Hi SDNs Here iam doing one report. My client has been maintaining condition type in % he entered manuvally in the sales oredr and that would be copied in to billing that is commission condition type . When he execued the report he wants shown percent

  • Oracle Configuration Manager (OCM) and Software Configuration Manager (SCM)

    Hi Has anyone been able to install OCM(Oracle Configuration Manager, v 10.2.7) and successful upload new Software Configurations to Metalink 3? We have managed to download the OCM software (version 10.2.7), version 10.3.0 does not seam to be availabl