Running the Transit Reference Application Sample

The Tansit sample illustrates the use of the Java Card API, scenarios of package masking, and post-manufacture installation. The Tansit sample demonstrates how a card holder can use a web enabled point-of-sale applet on a Java Card 3 platform enabled smart card to manage their transaction account, a user can securely manage their transaction account from an untrusted web browser, a user can make secure transactions using their Java Card 3 platform enabled smart card (in this sample the transactions are turnstile activities), and administration functions can be performed as the user conducts trqansactions. This sample contains nine library and web applications that demonstrate the wallet, turnstile, transaction, and administration event mechanisms.

Running the Transit sample consists of using the IDE to open and run the individual projects in the following sequence:


Note - The POSWeb application has been internationalized and can be localized for the French language.


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 AdminWeb,ClassicWalletApplet, POSWeb, TransitExtLib, TurnstileApplet, TurnstileClient, TurnstileWeb, WalletAssistApplet, and WalletClassicLib projects are located under the JC_CONNECTED_HOME\samples\web\Transit folder.


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


  1. Build the WalletClassicLib project.

    See Build WalletClassicLib.

  2. Build the TransitExtLib project.

    See Build TransitExtLib.

  3. Run the ClassicWalletApplet sample application.

    Verify that the applet was successfully created. The SELECT APDU command returns success status word 90 00. Additional APDU commands are used to credit the Wallet additional $100 (0x64). Verify that these commands return success status words 90 00. See Run ClassicWalletApplet.”

  4. Run the WalletAssistApplet sample application.

    Verify that the applet was successfully created. The SELECT APDU command returns Status word 69 99. See Run WalletAssistApplet.”

  5. Run the POSWeb sample application.

    See Run POSWeb.

  6. Run the AdminWeb sample application.

    See Run AdminWeb.

  7. Run the TurnstileApplet sample application.

    The log window displays a 90 00 in select response.See Run TurnstileApplet.

  8. In the AdminWeb page, click the UNBLOCK button.
  9. Run the TurnstileClient project.

    See Run TurnstileClient.

  10. Run the TurnstileApplet sample application.

    The Output window displays 90 00 completes and SUCCESSFULL.

  11. In the Transit Point of Sale Main Page, click the REFRESH BALANCE button.

    The balance displays 2 less - 98.

  12. Run the TurnstileWeb sample application.

    The browser displays the Entry page. See Run TurnstileWeb

  13. On the Transit Administration Main Page click the UNBLOCK button.
  14. Select Zone 1 and click the ENTER button.

    The browser displays the Transit Turnstile Exit page.

  15. Click the Exit button.
  16. Click the HISTORY button on the Transit Point of Sale Main Page.
  17. Close the browser to stop the application.