Posted by mriem
on October 5, 2012 at 7:25 PM PDT
You have written your own JSF converter. How do you package it so you can redistribute it?
In the previous blog entry you learned how to write your own converter. Say you want to distribute this converter to others. How can you make sure the JSF runtime knows about the converter without needing to add it to the faces-config.xml of the web application.
As described in the previous blog entry you need to register the converter in a faces-config.xml. To make it a redistributable converter, put the faces-confg.xml in the META-INF directory. The contents of the JAR file would be similar to the one below.
And then to use you can just add that JAR file to any web application by putting it into the WEB-INF/lib directory.