You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bruno Aranda <br...@gmail.com> on 2012/02/09 19:10:25 UTC

Myfaces 2.1.6 change of behaviour for h:outputScript

Hi,

I can see there are some improvements related to the resource handling and
to fix a security problem in MyFaces 2.1.6. However, now the behaviour for
h:outputScript seems to have changed and subfolders are not allowed in the
"library" attribute.

Before I could do things like:

<h:outputScript library= "javascript/mysuperlibrary"
name="mysuperscript.js" />

And now the resource handler complains with a warning:

09-Feb-2012 18:04:21 org.apache.myfaces.renderkit.html.HtmlScriptRenderer
encodeEnd
WARNING: Resource referenced by resourceName mysuperscript.js and
libraryName javascript/mysuperlibrary not found in call to
ResourceHandler.createResource. It will be silenty ignored.

Am I doing something wrong? Do I need my own ResourceHandler if I want to
have all my resources in their subfolders, resulting in a more tidy project?

Cheers,

Bruno

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Posted by Werner Punz <we...@gmail.com>.
Am 09.02.12 19:19, schrieb Bruno Aranda:
> Good, that works. Thanks. Only that IntelliJ IDEA does not like it much.
>
Thats a bug in IDEA, I would suggest to file a bugreport. I cannot 
remember if I already filed one regarding this issue.



Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Posted by Bruno Aranda <br...@gmail.com>.
Good, that works. Thanks. Only that IntelliJ IDEA does not like it much.

Another issue I have found though is with the composite components
namespace. Before I could have:

xmlns:iv="http://java.sun.com/jsf/composite/mysuperlibrary/components"

And now that does not seem to work. You can always move "components" to the
"resources" folder, but I wonder if subfolders can be used there or if I am
using a wrong namespace...

Thanks,

Bruno

On 9 February 2012 18:13, Thomas Andraschko <zo...@googlemail.com> wrote:

> Hi,
>
> why you can't use the directory in the name attribute?
>
> <h:outputScript library="javascript" name="mysuperlibrary/mysuperscript.js"
> />
>
> Regards,
>
> Thomas
>
> 2012/2/9 Bruno Aranda <br...@gmail.com>
>
> > Hi,
> >
> > I can see there are some improvements related to the resource handling
> and
> > to fix a security problem in MyFaces 2.1.6. However, now the behaviour
> for
> > h:outputScript seems to have changed and subfolders are not allowed in
> the
> > "library" attribute.
> >
> > Before I could do things like:
> >
> > <h:outputScript library= "javascript/mysuperlibrary"
> > name="mysuperscript.js" />
> >
> > And now the resource handler complains with a warning:
> >
> > 09-Feb-2012 18:04:21 org.apache.myfaces.renderkit.html.HtmlScriptRenderer
> > encodeEnd
> > WARNING: Resource referenced by resourceName mysuperscript.js and
> > libraryName javascript/mysuperlibrary not found in call to
> > ResourceHandler.createResource. It will be silenty ignored.
> >
> > Am I doing something wrong? Do I need my own ResourceHandler if I want to
> > have all my resources in their subfolders, resulting in a more tidy
> > project?
> >
> > Cheers,
> >
> > Bruno
> >
>

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Posted by Bruno Aranda <br...@gmail.com>.
Good. That answers as well the problem with the composite component
namespaces.

Thanks Leonardo and Thomas!

Bruno

On 9 February 2012 18:22, Leonardo Uribe <lu...@gmail.com> wrote:

> Hi
>
> According to the spec wording (JSF 2.0 spec section 2.6.1.3), it is
> invalid to have '/' in library names. A new web config param was
> added:
>
> org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
>
> by default false. Enable it to true solves the problem.
>
> See
>
> https://issues.apache.org/jira/browse/MYFACES-3454
>
> for details.
>
> Resource names can always have slashes.
>
> regards,
>
> Leonardo Uribe
>
> 2012/2/9 Thomas Andraschko <zo...@googlemail.com>:
> > Hi,
> >
> > why you can't use the directory in the name attribute?
> >
> > <h:outputScript library="javascript"
> name="mysuperlibrary/mysuperscript.js"
> > />
> >
> > Regards,
> >
> > Thomas
> >
> > 2012/2/9 Bruno Aranda <br...@gmail.com>
> >
> >> Hi,
> >>
> >> I can see there are some improvements related to the resource handling
> and
> >> to fix a security problem in MyFaces 2.1.6. However, now the behaviour
> for
> >> h:outputScript seems to have changed and subfolders are not allowed in
> the
> >> "library" attribute.
> >>
> >> Before I could do things like:
> >>
> >> <h:outputScript library= "javascript/mysuperlibrary"
> >> name="mysuperscript.js" />
> >>
> >> And now the resource handler complains with a warning:
> >>
> >> 09-Feb-2012 18:04:21
> org.apache.myfaces.renderkit.html.HtmlScriptRenderer
> >> encodeEnd
> >> WARNING: Resource referenced by resourceName mysuperscript.js and
> >> libraryName javascript/mysuperlibrary not found in call to
> >> ResourceHandler.createResource. It will be silenty ignored.
> >>
> >> Am I doing something wrong? Do I need my own ResourceHandler if I want
> to
> >> have all my resources in their subfolders, resulting in a more tidy
> >> project?
> >>
> >> Cheers,
> >>
> >> Bruno
> >>
>

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

According to the spec wording (JSF 2.0 spec section 2.6.1.3), it is
invalid to have '/' in library names. A new web config param was
added:

org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME

by default false. Enable it to true solves the problem.

See

https://issues.apache.org/jira/browse/MYFACES-3454

for details.

Resource names can always have slashes.

regards,

Leonardo Uribe

2012/2/9 Thomas Andraschko <zo...@googlemail.com>:
> Hi,
>
> why you can't use the directory in the name attribute?
>
> <h:outputScript library="javascript" name="mysuperlibrary/mysuperscript.js"
> />
>
> Regards,
>
> Thomas
>
> 2012/2/9 Bruno Aranda <br...@gmail.com>
>
>> Hi,
>>
>> I can see there are some improvements related to the resource handling and
>> to fix a security problem in MyFaces 2.1.6. However, now the behaviour for
>> h:outputScript seems to have changed and subfolders are not allowed in the
>> "library" attribute.
>>
>> Before I could do things like:
>>
>> <h:outputScript library= "javascript/mysuperlibrary"
>> name="mysuperscript.js" />
>>
>> And now the resource handler complains with a warning:
>>
>> 09-Feb-2012 18:04:21 org.apache.myfaces.renderkit.html.HtmlScriptRenderer
>> encodeEnd
>> WARNING: Resource referenced by resourceName mysuperscript.js and
>> libraryName javascript/mysuperlibrary not found in call to
>> ResourceHandler.createResource. It will be silenty ignored.
>>
>> Am I doing something wrong? Do I need my own ResourceHandler if I want to
>> have all my resources in their subfolders, resulting in a more tidy
>> project?
>>
>> Cheers,
>>
>> Bruno
>>

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Posted by Thomas Andraschko <zo...@googlemail.com>.
Hi,

why you can't use the directory in the name attribute?

<h:outputScript library="javascript" name="mysuperlibrary/mysuperscript.js"
/>

Regards,

Thomas

2012/2/9 Bruno Aranda <br...@gmail.com>

> Hi,
>
> I can see there are some improvements related to the resource handling and
> to fix a security problem in MyFaces 2.1.6. However, now the behaviour for
> h:outputScript seems to have changed and subfolders are not allowed in the
> "library" attribute.
>
> Before I could do things like:
>
> <h:outputScript library= "javascript/mysuperlibrary"
> name="mysuperscript.js" />
>
> And now the resource handler complains with a warning:
>
> 09-Feb-2012 18:04:21 org.apache.myfaces.renderkit.html.HtmlScriptRenderer
> encodeEnd
> WARNING: Resource referenced by resourceName mysuperscript.js and
> libraryName javascript/mysuperlibrary not found in call to
> ResourceHandler.createResource. It will be silenty ignored.
>
> Am I doing something wrong? Do I need my own ResourceHandler if I want to
> have all my resources in their subfolders, resulting in a more tidy
> project?
>
> Cheers,
>
> Bruno
>