You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Julian Ray <ju...@yahoo.com> on 2006/05/02 18:39:16 UTC

AddResource from JAR

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?
 
Thanks
Julian
 

Re: AddResource from JAR

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

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 <da...@brondsema.net> 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
>
>
>
>

Re: AddResource from JAR

Posted by Dave Brondsema <da...@brondsema.net>.
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