• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Communicating Among differennt Applications in Tomcat

 
Deepika Saxena
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
is it possible to communicate among the applications that are deployed in tomcat?
for example, if we have app1 , app2 and app3 running in a tomcat server and if we want to interact between app1 and app2 , can we do it? if so, please tell how to achieve this.

Thanks.
--Deepika.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd set them up as web services.
 
Deepika Saxena
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bibeault. is this the only possible way to interact between two web applications? isn't there any other scope which allows to interact among different web applications that are deployed in the same server?

--Deepika
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, though its one of the cleanest.

You can just post normal requests back and forth between them as well.

There are some cross-context tricks that Tomcat allows, but I avoid them because they are non-standard and are trouble just waiting to happen.
 
Deepika Saxena
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bibeault.
--Deepika
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web requests - be they ReST, Web services/SOAP or roll-your own are the most portable way of inter-app communication.

If your Tomcat is embedded in a full J2EE stack server such as JBoss, you can also use EJBs and/or JMS.

There are many other ways as well, but most of the others are rather specialized and not as simple/portable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic