An example of using InvocableServlet.

ENTERPRISE JAVA
Invoke Servlet Methods From Java Apps

David Tayouri
Listing 5. An example of using InvocableServlet.


public class MyServlet extends InvocableServlet
{
  //===========================================
  public void doPost(
    HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
  {
    invokeMethod(req, res);
  }

  //===========================================
  public void sendEvent(long popId)
    throws EventHandlingException
  {
    System.out.println("sendEvent was called");
  }
}

Upcoming Training Events

0 AM
Visual Studio Live! San Diego
September 8-12, 2025
Live! 360 Orlando
November 16-21, 2025
Cloud & Containers Live! Orlando
November 16-21, 2025
Data Platform Live! Orlando
November 16-21, 2025
Visual Studio Live! Orlando
November 16-21, 2025