webtier@glassfish.java.net

Re: [webtier] h:outputScript and scripts in signed jar.

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 01 Apr 2009 09:31:32 -0700

On 4/1/09 8:31 AM, webtier_at_javadesktop.org wrote:
> Suppose one has a situation when a signed jar is needed. Usually these are referenced via
> jar:http://www.domain.com/secure-scripts/secure.jar!/script.js
> note the extra "jar:" prefix and an extra "!/script.js" suffix (it leads to a unable to found resource warning)
> Is this tag and resource system capable of handling such cases?
>
> Now I'm using a workaround like:
> <script type="text/javascript" src="jar:#{facesContext.externalContext.requestContextPath}/resources/js.jar!/script.js"/>
> I'm lucky that I can just reference it once in the template page of my application.
>
Doesn't look like the resource system is being used right here :

jar:#{facesContext.externalContext.requestContextPath}/resources/js.jar!/script.js


Jar files containing resources should be placed in WEB-INF/lib with any
resources within the JAR
within the META-INF/resources directory.

So assuming the signed jar has META-INF/resources/script.js, then the
h:outputScript would simply be:

<h:outputScript name="script.js" />


> [Message sent by forum member 'nzinoviev' (nzinoviev)
>
> http://forums.java.net/jive/thread.jspa?messageID=340059
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>