Skip to main content

JSF Tip #48 - Use a custom packaged converter

Posted by mriem on November 27, 2013 at 11:44 AM PST

Note this blog is obsolete, see for the current blog

In the previous blog entry we touched upon packaging a custom converter. Now we'll describe what you need to do to use it.

Add the maven dependency to your project.


And use it.

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE html>

<html xmlns=""
        <title>Custom Converter - f:converter tag</title>
        <h2>Custom Converter - f:converter tag</h2>
            Below you will see a string that was generated using a custom converter
            named 'customConverterId'. See the sources for the source for this
        <h:outputText value="#{customConverterBean.custom}">
            <f:converter converterId="customConverterId"/>

Note the code for this sample is available as part of the Glassfish samples (see the subversion repository at

And that is it.


Related Topics >>