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");
  }
}