• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RequestDispatcher Communicating between WebApps

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
John Lark
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I'll take a look at that java.net thanks!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic