Weblets are created for this purpose but seem a little bit complicated to me. Another workaround should be to use a simple phaselistener which I suggest if you are writing a custom component library since it needs no configuration for the end user.
Here is an example of a phaselistener serving resources from a jar;
http://fisheye5.cenqua.com/viewrep/~raw,r=1.2/glassfish/jsf-extensions/run-time/src/main/java/com/sun/faces/util/ResourcePhaseListener.java
https://jsf-extensions.dev.java.net/nonav/docs/apidocs/com/sun/faces/util/ResourcePhaseListener.html
Regards,
Cagatay
On 5/4/06, Dave Brondsema
<[EMAIL PROTECTED]> wrote:
Julian Ray wrote:
> I posted this a few days ago but it might have slipped through the cracks...
>
> I am attempting to add resources from a jar of custom components using
> the AddResource service in Tomahawk. It works for resources which are
> configured within the WEB-INF but I'm struggling to get jar-configured
> resources to load. The extensions filter is setup and working,
> AddResource works for _javascript_ and css files which are statically
> stored but I can't seem to get the ResourceHandlers to work as MyFaces
> keeps complaining that it expects a myFacesCustomCommand.
>
> Are there any examples of doing this? Is it possible?
>
Have you looked at https://weblets.dev.java.net/ yet? It's designed for
serving resources out from a jar file.
--
Dave Brondsema
Software Developer
Cornerstone University