简体   繁体   中英

Webapps communication

I have two webapps: webapp1 webapp2

Is there a way i can make these two to communicate? For example, say servlet context itself.

I am using jetty to start my webapps.

java -cp xyz xyzJettyBootstrap webapp1.war java -cp xyz xyzJettyBootstrap webapp2.war

Both webapps resides in the same folder. Is it possible for me to have communication between these two webapps?

Thanks in advance.

There are many ways to get two web apps running on the same app server to communicate, but perhaps the easiest is to package them into the same application... EAR. An EAR has an application level classloader from which included web apps derive. You can put some classes into that classloader that will enable your data sharing. The web apps will be able to read/write data using normal Java means.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM