Running EventFacility Sample Web Application

The EventFacility sample demonstrates an Event facility containing two servlets, in which the first servlet registers a listener for events fired by another application. This sample contains two web applications that demonstrate the event mechanism.

Running the EventFacility sample consists of using the using the IDE to open the EventListener and the EventSender projects, starting both the EventListener and EventSender applications, entering data in the Event Sender web page, clicking the Fire Event button on the page, and then using a hyperlink on the Event Listener page to display a list of received events.

Before You Begin

Before performing the following procedure, the Java Card 3 Development Kit, Connected Editon must be downloaded and installed on your development system.

The EventListener and the EventSender projects are located under the JC_CONNECTED_HOME\samples\web\EventFacility folder.


Note - Refer to the Java Card 3 Platform Development Kit User’s Guide for additional details including screen captures.


  1. Click File > Open Project in the main window.
  2. Go to the JC_CONNECTED_HOME\samples\web\EventFacility folder and open the EventListener and the EventSender projects.
  3. Select the EventListener project and click the run button in the main window.

    The IDE compiles, builds, and runs the SIOservice application. When the application runs, the IDE launches the default browser and displays a web page containing a hyperlink to the List of Received Events.

  4. Select the EventSender project and click the run button in the main window.

    The IDE compiles, builds, and runs the SIOservice application. When the application runs, the IDE launches the default browser and displays the Event Sender form.

  5. Enter some text in the Data field and click the Fire event button.

    The browser displays a page with the new text.

  6. In the Event Facility Listener page, click the List of Received Events hyperlink.

    The application displays a list of events fired by the custom event servlet.

  7. Close the browser to stop the application.