File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to do Communication between two web applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to do Communication between two web applications" Watch "How to do Communication between two web applications" New topic
Author

How to do Communication between two web applications

Prafulla N. Patil
Ranch Hand

Joined: Mar 20, 2006
Posts: 106
hi all,

any idea about how to do Communication between two web applications?

Thanks in advance


Thanks, Prafulla Patil
SCJP, SCWCD
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There are many ways.
The right one for you depends on what you're doing and where the applications are located.
If you search this forum you'll find that this question is asked and answered a lot here.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Cristian Popovici
Ranch Hand

Joined: Apr 13, 2007
Posts: 32
One way is to use the crossContext atribute in your context.xml file.

Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
is this part of the spec or something proprietary for a certain web container implementation?
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Michael Ku:
is this part of the spec or something proprietary for a certain web container implementation?

Not part of specification and I think its only available to Tomcat.


Rahul Bhattacharjee
LinkedIn - Blog
paritosh ranjan
Ranch Hand

Joined: Aug 24, 2007
Posts: 62
One way to communicate is through the ServletContext of different web applications.Firstly you will have to get the ServletContext of different web applications.You can get the ServletContext of another web application by using this.getServletContext().getContext(uripath),and use this ServletContext which is of another web application to share objects and this way you will be able to communicate through them.
There may be more and better ways to do this,I am just specifying one.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41096
    
  44
Just to throw a few other methods into the mix: mail, JMS, database, files, web service, HTTP -which probably would be the most natural for a web application-, ...

As was mentioned before, you'll find this discussed plenty of time if you search through old posts.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to do Communication between two web applications
 
Similar Threads
RMI Clustering in Tomcat using Spring.
Communication between two web applications
Communication between servlets
Forward or Redirect http request to a web application on different web container/JVM with some param
how to communicate between 2 servlets which are present in two different web applications