• 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

Inter servlet communication

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a small issue with the servlets. I have two servlets which need to communicate to each other. But both of them are in different applications on different servers (Websphere) Is there a way in which these can communicate to each other? I need to pass all request attributes/parameters of one servlet to be available to the other servlet in another application? I thought of appending stuff to URL, but thats ruled out. Am not sure RequestDispatcher would work too...!

Any ideas?
Thanks
Kash
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont think there is anything in the javax.servlet package to help you out in this.
You can use some other api to create a new request and post the data (parameters and attributres) as parameters to the second servlet.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're correct.
RequestDispatcher will not work.

This question gets asked a lot here so searching this forum should bring up a lot of information.
There are several ways for applications to communicate with one another.
The best depends on your details.

For simple communication, you could use java.net.URLConnection or
the httpClient at http://jakarta.apache.org/commons/httpclient.
 
Kash Mhai
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben,
I knew this was a frequently asked question, but i was not able to frame the exact text for framing the question. Maybe i'll start off with HttpClient

Thanks,
 
It's exactly the same and completely different as this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic