Discussions

Web tier: servlets, JSP, Web frameworks: Servlet-Servlet Communication

  1. Servlet-Servlet Communication (3 messages)

    Hi,
    How do you implement servlet-servlet communication when the servlets are not local to the server.
    Thanks in advance.
    Preeti

    Threaded Messages (3)

  2. Servlet-Servlet Communication[ Go to top ]

    The easiest way to do that is use HTTP. One servlet posts directly to the other servlet. Communication can be as basic as putting a query string on the end of the URL to putting an XML formatted file into the servlets request object, then the other servlet parses it. Using HTTP means you don't have to provide for any RMI or any other distributed services which require some overhead.
    rjb
  3. Servlet-Servlet Communication[ Go to top ]

    Can you send me sample code for this.My email Id is preeti_prat at yahoo dot com


    Thanks in advance.

    Preeti
  4. Servlet-Servlet Communication[ Go to top ]

    From what i understood was when you want to communicate between servlets located across 2 different servers.

    Take the results of the servlets as a XML file , pass this input into the other servlet on the different server, take the results out.This can be one of the possiblity.Please let me your exact problem.

    Prasath