• 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

Servlet Collaboration, and dispatching request

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to create a network of web servers for distributed applications. I want users to acess servlets at any server and the servlet at that server then passes information to a servlet at a central server. The central server then invokes another servlet at the original/other servers. I think this can be accomplished by servlet chaining but it seems there is some issue with containers supporting servlet chaining. Please suggest what protocol can be used to invokes servlets through servlets especially across web servers. :roll: :roll:
 
Author
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are on the same server you would use a RequestDispatcher to dispatch a request to another servlet. If you want to work with a servlet running on a different server then you will need to open a URLConnection and issue an HTTP request to that server and then read the response. Depending upon what you need to do you can work with either plain text, binary data, or serialized objects. If you need an example, pick up the Applet to Servlet Communication Web Application from http://www.servletguru.com/downloads.htm. There are a couple of simple examples included where a Java application calls a servlet; you could just as easily use this code from within a servlet to call another servlet.
Hope this helps.
 
arif azim
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you sir!........
 
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic