2 Replies Latest reply on Nov 22, 2001 12:33 AM by hstech

    sharing information between two web application

    sundaram

      Hi,

      I want to share information between two web applcation.

      Is there a way for this.!!!

      For More Info about the problem.
      -------------------------------

      http://www.allaire.com/handlers/index.cfm?ID=18434

      Different Web applications hosted on the same container do not share the clients' session
      information. That is, if you have two Web applications deployed on the same container, servlets in both applications "see" two different sessions for the same client. This is a marked difference from the old servlet model in which a container (a.k.a., "servlet engine") can establish only one client session. You now need to implement more ingenious ways to share data between your Web applications.


      SR

        • 1. Re: sharing information between two web application
          schaefera

          I know two differnt ways. The first is the quick-and-dirty, the second the slow but correct version.

          1) Create singleton classes are use the static lookup to find the information container. This works fine as long as all the web application are running in the same JVM but this is not ensured therefore for a production application hands-off.

          2) Use a persistent data store to save the information and share them. This can be a DB, properties file etc.

          Have fun - Andy

          • 2. Re: sharing information between two web application
            hstech

            SR,

            You could also consider using serialized Java objects stored in a JNDI directory.

            Cheers,
            Aaron.