How do you call a method in servlet?

A servlet can call another servlet's public methods directly, if the two servlets run within the same server....To call another servlet's public methods directly, you must:

  1. Know the name of the servlet that you want to call.
  2. Gain access to that servlet's Servlet object.
  3. Call the servlet's public method.

Related posts: