The TrueLicense JSF module provides a web user interface for consuming license keys.


Using the Truelicense JSF you can…

  • Consume license keys using a web user interface based on Facelets.
  • Take advantage of an internationalized API with English and German localizations.
  • Customize the display using Cascading Style Sheets (CSS).


This is a simple using page for the Facelet based wizard component:

<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml"
        <title>TrueLicense JSF Test</title>
        <tl:wizard id="wizard" manager="${licensingSchema.manager()}"
        <html:messages showDetail="false"/>

The <tl:wizard> component renders a dialog for license consumer management. The output is bare-boned HTML - no CSS decoration is provided. However, all rendered HTML tags use the id and class attributes so that you can easily style them with your own CSS.

The boolean attribute uninstallable controls whether license key uninstallation shall be supported by the wizard component.

The EL expression for the manager attribute needs to resolve to a license consumer manager of the interface type net.truelicense.api.ConsumerLicenseManager. If you have used the TrueLicense Maven Archetype to generate a project, then you just need to annotate the LicensingSchema class in the KeyMgr module like this:

package ${package}.keymgr;

import javax.inject.Named
import net.truelicense.api.ConsumerLicenseManager;

public class LicensingSchema {


    /** Returns the first consumer license manager in the configured chain-of-responsibility. [...] */
    public static LicenseConsumerManager manager() { [...] }

The @Named annotation makes the LicensingSchema class available to EL. The returned consumer license manager has singleton scope, nevertheless what the framework thinks it is.