Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application level communication

 
Vrushali Gore
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have designed two web applications using servlets. Can servlet of one web application communicate with servlet of another web application
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on what you mean by communicate.

Can you tell us what you're trying to do?
 
Vrushali Gore
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to send some data from servlet in one web application to servlet in another web application.

Let's say I am having 2 webapps like abc.war(having servlet A) & xyz.war(having servlet B) so from now servlet A data is to be transferred to servlet B

Thanks for your reply.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are any number of ways: HTTP (which might be easiest), shared files, web service, JMS, Email, shared DB, TCP/IP, ...

Direct access to objects or sessions in another web app can be enabled on some servlet engines, but is server-specific. For Tomcat, have a look at the crossContext attribute of the Context. It enables the use of RequestDispatchers across web apps.
[ August 24, 2006: Message edited by: Ulf Dittmer ]
 
Vrushali Gore
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
Do Tomcat only provides the way? Servlet technology is not having any approach to this. Suppose if two webapps are running in the same webserver or two webapps are running in differnet servers do i will have to go for some other mechanism?

If you can elaborate your answer more i would be very thankful to you.

Thnaks once again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic