aspose file tools*
The moose likes Servlets and the fly likes RequestDispatcher Communicating between WebApps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher Communicating between WebApps" Watch "RequestDispatcher Communicating between WebApps" New topic
Author

RequestDispatcher Communicating between WebApps

John Lark
Ranch Hand

Joined: Feb 08, 2010
Posts: 72
Hi All,

Here is my situation. I have two war files inside of an instance of tomcat. I am changing a registry setting in war A, I need to tell war B to read this setting and change one of its connections to a third piece which is irrelevant. I wanted to use the Request dispatcher to communicate between the two different servletts, but all the examples seem to display examples in jsp files? Can Some one please point me towards an example where one java class communicates to another java class in a different war. Or even suggest a better alternative to the Request Dispatcher.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61415
    
  67

RequestDispatcher is not the answer.

Rather, send a request to the other web app. You can do this with the classes in the java.net package, or at a higher level with a tool such as HttpClient.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
John Lark
Ranch Hand

Joined: Feb 08, 2010
Posts: 72
I have the war file I need to send a command secured via https, so part of the problem is I am looking for a way around HTTP protocal. My initial attempt involved RMI, I haven't had a lot of success with this. I wont go into details as to why, but I don't have an abundant amount of time to spend on this, so I need to move on. I was sent a link and instructed to monitor the registry for changes. The problem is the link was in reference to C++. So I need to figure it out in Java or write an api. I am going to ask about Monitoring the registry for Java in another post in General Java... Thanks for the response sorry for the long time to reply.
John Lark
Ranch Hand

Joined: Feb 08, 2010
Posts: 72
And I'll take a look at that java.net thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RequestDispatcher Communicating between WebApps