DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Mark Alexander Bertenshaw Guest

    Sharing session state between Servlet applications/contexts


    Hi -

    I am pretty new to all this Java stuff, and I have to find out why the session
    of a web application defined in a <context> section of server.xml is not
    acessible in a web application defined in a different <context> section.
    By "not acessible", I mean that you get null when you do request.getSession(false)
    after having previously run a servlet in the same browser.

    Can anybody explain how session() works in this context?

    Thanks,

    --
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Chordiant Software, Inc.
    Brentford
    UK

  2. #2
    MarkN Guest

    Re: Sharing session state between Servlet applications/contexts


    Mark,
    What web/app server are you using? Typically a servlet in one web app
    (and its sessions) are not available to another webapp. This may be different
    depending on web/app server and maybe configurable too. I've not personally
    done alot with session variables. We keep state differently because we mainly
    use applets or applications as our frontends. If you want the soapbox reason
    let me know.

    Mark

    BTW, one does't run a servlet in a browser.
    "Mark Alexander Bertenshaw" <mark.bertenshaw@virgin.net> wrote:
    >
    >Hi -
    >
    >I am pretty new to all this Java stuff, and I have to find out why the session
    >of a web application defined in a <context> section of server.xml is not
    >acessible in a web application defined in a different <context> section.
    > By "not acessible", I mean that you get null when you do request.getSession(false)
    >after having previously run a servlet in the same browser.
    >
    >Can anybody explain how session() works in this context?
    >
    >Thanks,
    >
    >--
    >Mark Alexander Bertenshaw
    >Programmer/Analyst
    >Chordiant Software, Inc.
    >Brentford
    >UK



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links