You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ak <an...@yahoo.com> on 2008/10/17 18:18:38 UTC
Re: Problem serving images from resource folder named 'resources'
Hello Martijn,
I am sorry Martijn, by mistake I sent as a mail.
I am facing the problem with Wicket 1.3.0 and this time I have 'img'.
Sample error message:
SEVERE: unable to lazily register shared resource img/indicator.gif
java.lang.ClassNotFoundException: img
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:286)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:259)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
Any ideas where I could have gone wrong ??
Thanks
Andy
Martijn Dashorst wrote:
>
> resources is a reserved path name for Wicket: shared resources from
> the classpath are served from that path (e.g. wicket-ajax.js). rename
> your folder to something else, or find a way to rename the wicket
> reservation for resources to something else (should be possible
> somewhere in one of the settings).
>
> Martijn
>
> On 3/13/08, Enrique Rodriguez <en...@gmail.com> wrote:
>> Hi, wicket-users,
>>
>> I just upgraded several Wicket sites from 1.2.4 to 1.3. I now have a
>> problem where images in a folder called 'resources' won't appear. In
>> other words, I have a WAR source directory of 'src/main/webapp' which
>> has images in a folder 'resources'. My HTML then has images
>> referenced by:
>>
>> resources/button.gif
>>
>> Attempts to view these images result in error:
>>
>> ERROR [SharedResourceRequestTarget] shared resource button.gif not found
>>
>> I have other folders, such as 'src/main/webapp/[anything but
>> 'resources']' and images serve just fine out of those folders. In
>> fact, if I simply rename 'resources' to 'resources1' and update my
>> HTML everything works. The problem is I have 3 webapps and many
>> images with this problem and, more importantly, a political issue with
>> going back to the HTML designers if we can't use 'resources' as a
>> folder name anymore.
>>
>> Interestingly, if I attempt to serve an image in a folder under
>> 'resources', such as 'resources/tabs/tab.gif' I get exception:
>>
>> ERROR [SharedResourceRequestTarget] unable to lazily register shared
>> resource resources/tabs/tab.gif
>> java.lang.ClassNotFoundException: resources
>> ... (SharedResourceRequestTarget:146)
>>
>> Is there a workaround so I can use the name 'resources'? Perhaps a
>> way to explicitly declare a resource path alias?
>>
>> Enrique
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.1 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Problem-serving-images-from-resource-folder-named-%27resources%27-tp16038815p20036496.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem serving images from resource folder named 'resources'
Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Ak, did you use a key called : "img/indicator.gif", looks like wicket
are trying to lookup img as class.. Is it a packaged resource or? What I
did for my icons where to generate a package for them so I had a
javapackage called icons you could probablly do the same with your img..
And I used the icon.class as scope and preheater (it loads all the icons
at startup).
ak wrote:
> Hello Martijn,
>
> I am sorry Martijn, by mistake I sent as a mail.
> I am facing the problem with Wicket 1.3.0 and this time I have 'img'.
>
> Sample error message:
>
> SEVERE: unable to lazily register shared resource img/indicator.gif
> java.lang.ClassNotFoundException: img
> at
> weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:286)
> at
> weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:259)
> at
> weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
>
> Any ideas where I could have gone wrong ??
>
> Thanks
> Andy
>
>
> Martijn Dashorst wrote:
>
>> resources is a reserved path name for Wicket: shared resources from
>> the classpath are served from that path (e.g. wicket-ajax.js). rename
>> your folder to something else, or find a way to rename the wicket
>> reservation for resources to something else (should be possible
>> somewhere in one of the settings).
>>
>> Martijn
>>
>> On 3/13/08, Enrique Rodriguez <en...@gmail.com> wrote:
>>
>>> Hi, wicket-users,
>>>
>>> I just upgraded several Wicket sites from 1.2.4 to 1.3. I now have a
>>> problem where images in a folder called 'resources' won't appear. In
>>> other words, I have a WAR source directory of 'src/main/webapp' which
>>> has images in a folder 'resources'. My HTML then has images
>>> referenced by:
>>>
>>> resources/button.gif
>>>
>>> Attempts to view these images result in error:
>>>
>>> ERROR [SharedResourceRequestTarget] shared resource button.gif not found
>>>
>>> I have other folders, such as 'src/main/webapp/[anything but
>>> 'resources']' and images serve just fine out of those folders. In
>>> fact, if I simply rename 'resources' to 'resources1' and update my
>>> HTML everything works. The problem is I have 3 webapps and many
>>> images with this problem and, more importantly, a political issue with
>>> going back to the HTML designers if we can't use 'resources' as a
>>> folder name anymore.
>>>
>>> Interestingly, if I attempt to serve an image in a folder under
>>> 'resources', such as 'resources/tabs/tab.gif' I get exception:
>>>
>>> ERROR [SharedResourceRequestTarget] unable to lazily register shared
>>> resource resources/tabs/tab.gif
>>> java.lang.ClassNotFoundException: resources
>>> ... (SharedResourceRequestTarget:146)
>>>
>>> Is there a workaround so I can use the name 'resources'? Perhaps a
>>> way to explicitly declare a resource path alias?
>>>
>>> Enrique
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>> --
>> Buy Wicket in Action: http://manning.com/dashorst
>> Apache Wicket 1.3.1 is released
>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>
>
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org