Cross Context Session Tracking

Hi All,
I am developing an enterprise application which have more than one web module i wants to carry the session of login module to other web modules but i cant able to achive this through HTTPSession object is there any way to achive this like yahoo is doing.
Thanks in advance

If you are refering to an enterprise application it general works with different ways by Using WebServices,Java Messaging.....& etc when you are more concerned with security & etc.
you may have to go deep for understading those technologies in the first place.
But most of the people compensate that by using client side cookies & other slugish techniques
checkout the article below which could be useful if your cause of concern is not so imp when it comes to scalablity & security.
http://www.fwd.at/tomcat/sharing-session-data-howto.html
http://www.jguru.com/faq/view.jsp?EID=511752
REGARDS,
RaHuL

Similar Messages

  • What is Cross Context session.

    HI,
    What is Cross Context session?
    Iam using Tomcat .
    pls help
    Thanks in advance
    arvin

    Where have u heard about that concept? I don't know it.
    I know about "crossContext" feature of Tomcat which means other applications can gain access to ServletContext of your application (by using the appropiate API), but did know nothing about "cross context sessions"...
    Sorry.

  • Step by Step to configure cross-context in Weblogic 10.3.2

    Hello Everyone,
    How to configure a web application to allow cross context calls in Weblogic 10.3.2?
    Please let me know the solution on this?
    Thanks,
    Praveen

    Hi Praveen,
    Maybe you could take a look at [Using Sessions and Session Persistence|http://download.oracle.com/docs/cd/E17904_01/web.1111/e13712/sessions.htm#WBAPP300]
    Hope it helps,
    Luis

  • Change session tracking cookie name

    Hello,
    Is there a way to change the default JSESSIONID cookie name to some thing different for session tracking? I've searched around but have not found anything on this subject.
    Thanks.

    Are the web applications deployed at '/' on each server or are they deployed using unique context paths such as /app1, /app2 etc?
    Which of the following represents how you access each app through the reverse proxy server?
    a) http://app1.foo.com/
    http://app2.foo.com/
    where app1.foo.com, app2.foo.com all map to the proxy server which then reverse proxies each URL to the corresponding backend server/app
    or
    b) http://foo.com/app1
    http://foo.com/app2
    where foo.com maps to the proxy server and the proxy server reverse proxies /app1 to one server, /app2 to another and so on

  • Cross context.. why ?

    I have a set of common servlets that sit in my tomcats common/lib folder.
    These servlets interact with a variety of jsp's running on their own contexts.
    Any session data is not available to the other jsps because they all have cross context=false
    However...
    One of the servlets is a filter that catches changes to a particular session variable, and adds or removes items from a vector. This vector holds a list of current users online, and regardless of which context I view this list from, it shows ALL the users from every context.
    I'm guessing therefore, that filters that are deployed in the common/lib folder do not honor the cross context = false definition set in the context xml file. Why is there not one Vector per context ?
    Your comments would be much appreciated.

    The vector is probably a static member of the filter class. Use the application scope to store a unique vector for each application instead.

  • Session tracking and Internet Explorer

    Hi,
    I am currently maintaining a servlet application, on apache/jserv.
    This application implements a session tracking using a shared static hashtable of session data, associated with session id's.
    This application may open more than one client browser windows.
    With netscape, no problem.
    With Internet Explorer, since the version 6, when the client close at least one window, the session is closed.
    Thus, the application reject any new request from this client, sent by still open windows (session cannot be retrieved in the hashtable).
    Has somebody heard about this problem ?
    Thanks for any answer.

    Thanks.
    In fact, I believe that IE keeps the same session for
    child windows.
    The problem is: when you click on a link which open a
    new window, the new open window share the session with
    its parent window.
    When the new window is closed, the session is also
    closed.
    It appears that this mechanism only exists since the
    version 6 of IE.No. Earlier IE version handle session cookies the same way.

  • URL Session Tracking

    Hi,
    i want to make a group of JSP pages in a Web App, but assuming that the browser doesn't accept cookies.
    Is there anyway that i don't have to indicate every link as
    response.encodeUrl("index.jsp")I've heard something about a <url-session-tracking/> tag, but i've tried to put in the web.xml file, but it doesn't work.
    I just want to put Index and the App Server takes care of putting the jsessionid info in front of the url
    Thank you

    Cancelling this question.

  • Can we use an overloaded constructor of a Java Bean with Session Tracking

    Hi Friends,
    If any one can solve my query.... It would be helpful.
    Query:
    I have a Java Bean with an overloaded constructor in it. I want to use the overloaded constructor in my JSP.
    1. One way of doing that is to use it directly in the "Scriptlets" (<% %>). But then I am not sure of the way to do session tracking. I think I can use the implicit objects like "session", "request" etc. but not sure of the approach or of the implementation method.
    2. Another way is through the directive <jsp: useBean>. But I cannot call an overloaded constructor with <jsp: useBean>. The only alternative way is to use the directive <jsp: useBean> where I have to write getter and setter methods in the Java Bean and use the <jsp: setProperty> and <jsp: getProperty> standard actions. Then with this approach I cannot use the overloaded constructor.
    Can any one suggest me the best approach to solve this problem ?
    Thanks and Regards,
    Gaive.

    My first reaction is that you can refactor your overloaded constructor into an init(arguments...) method. Instead of overloaded constructor, you can call that init method. This is the ideal solution if possible.
    As to the two choices you listed:
    1. This is OK, I believe. You can use scriplet to define the bean and put it into session scope of the pageContext. I am not sure exactly what you meant by session tracking; whatever you meant, it should be doable using HttpSessionAttributeListener and/or HttpSessionBindingListener.
    2. Agreed. There is no way that <jsp:useBean> can call a constructor that has non-empty arguments.
    Please tell me how it works for you.

  • How to do session tracking in JSP

    I want to do session tracking in my JSP pages.Say once after the user logs in,on every page I can get his username for further use.Thank you for your help!
    Richard

    <%
    session.setAttribute("svUserName", request.getParameter("name_of_username_form_field"));
    // from the login page
    %>
    then to retrieve,
    <% String UserName;
    UserName = (String)session.getAttribute("svUserName").toString(); %>
    to display,
    <%= UserName %>

  • How to use session tracking

    i am making shopping mall project .
    ist page conatins list of product avaiale
    2nd page contains list of manufacturuer avaible
    problem:-
    i want to display on 3rd page the product seleted by user in 1st page
    i used session tracking concept.but problem is the value is coming null in third page
    please tell me how to solve my problem

    If it is like a shopping cart, I suggest you to look for a good shopping cart examples available plenty online.
    But if its just about keeping session variables and using them the following works.
    Test with a simple example. Have three jsp files like a.jsp, b.jsp and c.jsp.
    put the following in a.jsp
    <% session.setAttribute("Mobile","Nokia");%>
    <%=session.getAttribute("Mobile")%>
    <a href="b.jsp">Go to B.jsp</a>Print the value of session variable - <%=session.getAttribute("Mobile")%> in b.jsp and c.jsp
    And in b.jsp have a link to c.jsp and so on. Once you set a session variable, it lives as long as your session doesnt expire.
    Try it. and also look for more session tracking examples online.
    Message was edited by:
    passion_for_java

  • Session Tracking in Flex

    Hi All,
    I need a simple session tracking application. this
    application should include the following
    1) Each user should have a seperate session area where each
    user can store some info into it and retrive it.
    2) Know how many users have logged into the application.
    I come from j2ee background where these things are possible,
    so requiring the same for my application which involves multi user
    environment.
    If not the application some part of code/ ideas will be higly
    appreciated.
    Thanks in Advance to all,
    Vijay Karthik

    Hi Avinash,
    Put a status variable in the ModelLocator class(If you are using any Model class where your data can be accessed globally through out the application).
    Once the user is authenticated and logged in successfuly update the status of the variable and you can authorize based on this status variable whether
    the user is authorized to see the pages or not...
    Thanks,
    Bhasker Chari

  • Always use URL Rewriting for session tracking?

    All you JSP guru:
    I am working on a JSP project that requires session tracking. I have successfully implements session tracking with both cookies or URL rewriting. I know that with the HttpSession object, it will always try to use cookie first, if that's disabled, then it'll automatically switch to URL rewriting. However, is there a way to force the HttpSession object to ALWAYS use URL rewriting instead of cookies? I have searched for an answer for a long time and haven't been able to found a solution. Is it possible at all? Thank you very much.

    i was going to say that WebSphere always uses URL rewriting if you enable it at all, but someone beat me to it (indirectly) :-)
    however, that seemed to me to be a violation of the spec, which seemed to imply the behaviour you're describing (only use URL rewriting if cookies are not supported on the current client)
    here's a response someone else made on a websphere newsgroup to a statement in that regard:
    I believe you are technically correct. However from my
    experience, I think the spec if flawed in this area since
    there is no reliable way of determining whether the
    client browser supports cookies. The authority on
    cookies (www.cookiecentral.com) says:
    "To properly detect if a cookie is being accepted via
    the server, the cookie needs to be set on one HTTP
    request and read back in another. This cannot be
    accomplished within 1 request."
    This is asking too much of a servlet engine
    implementation. Even if it did submit a request for this
    purpose, the user could refuse the cookie. So
    then technically the browser supports cookies, but the
    servlet engine infers it doesn't. So if the servlet engine
    infers the browser does not support cookies and so
    encodes the URL, it is again out of spec because the
    browser really does support cookies. By doing it
    however encoding is configured makes things simpler,
    robust, consistent and avoids the flaw.
    My opinion.so, mostly i'm just rambling, but if you're using websphere, you should get the behaviour your boss wants. if you're using something else, i suppose there's a chance it'll "violate" the spec in this same, potentially helpful way.
    btw, i remember somebody else complaining that URL rewriting is less secure than cookies, but i kinda think they're about equal. it seems like either could be intercepted by a sniffer and then used to spoof. but i'm no expert in that stuff...

  • Disable non-SSL session tracking?

    Hi, all,
    I wonder if one can disable all session tracking in JSP's whenever SSL is not being used? I would like to turn off all cookie-setting and URL-rewriting and use SSL-session tracking only (if I use session-tracking at all on a given page). I also want to specify this behavior programmatically (inside my JSP's) and not in my server's config files.
    I'm basically concerned that if my user leaves one of my HTTPS pages, they will still retain a non-secure cookie with their session information. This seems to be indeed the default behavior: when I run my tests and transition from an HTTPS page to an HTTP one, the browser does store a cookie. I know I can invalidate the session as the next step, but I'd rather have the cookie not being set altogether to begin with. Imagine the situation where the user leaves my HTTPS page for a totally different (HTTP) website: in this setting I won't get a chance to invalidate the session and delete the cookie.
    Any ideas, therefore, on how to programmatically disable non-SSL session-tracking?
    Thanks,
    Dmitri.

    I don't think you can do this programatically.
    However I also don't think it is a problem.
    Cookies are related to zone names aren't they?
    http://mysite and https://mysite are two different
    zones as far as cookies are concerned. One should
    not be able to see the other.
    It issues a new cookie for the http site you are just
    navigating to. That cookie has nothing to do with
    the secure site you just came from, and shouldn't be
    able to tell them any info about the secure site.
    I think you are worrying about something that isn't
    really there.
    What is your concern? That they pick up a JSESSIONID
    from the cookie and can then pretend to be a
    different user?Yes. A cookie is transmitted and stored unencrypted, I imagine (in any case, it should be more easily crackable than SSL). I wish Sun came up with an extension to the Session API where you would be able to explicitly specify which session-tracking protocols you want used and which ones you don't. At the moment their API abstracts and manages too much detail for you.
    I mean, if my site is supposed to be secure while I'm using SSL, then you'd expect that no information about those secure sessions should leak outside the SSL protocol, wouldn't you say?

  • "cross context" and SUN ONE Application Server 8

    Hi All,
    I was running an application in tomcat which had "cross-context" set to true. I tried to deploy it under SAS but it doesn't work, when it requests a resource from a different context it is not found. When I go directly to that context it gives me the resource.
    Can anyone tell me what I should do to enable "crosscontext" (I had to do that to solve this problem in tomcat
    Kind regards,
    Marco Laponder

    In your web app's sun-web.xml, add this property:
    <sun-web-app>
    <property name="crossContextAllowed" value="true"/>
    </sun-web-app>

  • Session Tracking problem

    I am doing session tracking in jsp. what my purpose is i want to stop the user, if the user is already logged in.
    For this, i am creating a Hashtable and entering the user id and session id as key- value pairs into the hashtable when the user is loggin in, if not in the hashtale. If these values are already in the hashtable, i am restricting the user.
    when the user selects the log out option, i am invalidating the session and deleting the values in the hash table. this is working fine.
    What my problem is suppose if the user closes the window, the session will be expired. but,i am not able to delete the values which are in the hashtable.
    and if the user is trying to log in, according to my logic it is allowing the user.
    Thanks
    Anupama

    i hope this would add-up to others' suggestion, albeit, i would recommend a bit change:
    Given:
    a. you're already implementing a session object that has pair value of user id and session id;
    b. you want to restrict a user who previously logged-in but, say he/she accidentally or intentionally closed the browser, thus leaving his session object in the hashtable
    Proposed Solution:
    a. change your pair value from user id-session id to user id-passwd;
    Explanation:
    a. i believe that you maintain a user bean (with session scope) all throughout the web application;
    b. i also believe that at the same time, you maintain other beans of the same scope, but that's out of question;
    c. putting a session id will give you difficulties in validating a common user that previously logged in because each time a user logs-on, you generate a unique session id;
    d. therefore, you cannot test equality of newly logged user and his new session id with that of his previous in the hashtable (if case pertains to abnormal browser termination);
    e. changing a pair to user id and passwd will enable you to really trap and test if the new user has unterminated or invalidated session in the hashtable;
    f. now, if previously logged user (with session still in the hastable) logs for the second time, you may invalidate his old session and give him a new session.

Maybe you are looking for

  • GL posting clearing item amount and do not show doc status on the header

    Hello, GL post clearing amount both side and increase the no of items in the GL balance display. Inaddition, these clearing line item document header does not show document status field.  I have another GL which does not post extra two lines and clea

  • How to use java.util.UUID in a function?

    This works: create or replace and compile java source named "RandomUUID" as public class RandomUUID public static String create() return "123"; But this does not work: create or replace and compile java source named "RandomUUID" as public class Rando

  • Dashboard help?

    hello I am trying to make a widget contacts list in dashboard through one of my chat programs I use. I just want to be able to see whose online through the widget how can I get my contacts onto the widget, is there anyone who can help me get started?

  • Can't record in garageband, and no region is being made

    I've tried restart Garageband, reinstalling Garageband, but no matter what I do, record seems completely broken and no region is showing up (the region that shows the audio levels and is generally color coded). I don't seem to have any .plist prefere

  • Dreamweaver CS6 crashes when editing tables

    When I'm editing a table in the design view of Dreamweaver CS6, it stops responding and crashes. I have tried restarting my computer, restarting Dreamweaver (obviously) and repeating the same process, but it crashes in the exact same place. CS5.5 nev