You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "oliver.stef" <ov...@gmail.com> on 2013/02/21 14:57:49 UTC

load resource from other project

Hi, 

How can I load external properties file from other project? (I have
WicketApplication Project and another project named GeneralResources. I want
to load properties file that from GeneralResources project into my Wicket
project).

<http://apache-wicket.1842946.n4.nabble.com/file/n4656648/GeneralResources1.png> 
tried to do:
IResourceSettings resourceSettings = getResourceSettings();
	
resourceSettings.addResourceFolder("C:\MyApplication\GeneralResources\Resurces\);

but no success.

Any ideas?

Thanks






--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-resource-from-other-project-tp4656648.html
Sent from the Users forum 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: load resource from other project

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

We will need more information to be able to help you.
"Doesn't work" is not enough.

Put a breakpoint in ClassPathResourceFinder#find() and see why it is not
able to find it.


On Sun, Feb 24, 2013 at 10:50 AM, oliver.stef <ov...@gmail.com> wrote:

> Hi,
>
> Thanks for the replay!
>
> Did it - added in Init():
> resourceSettings.setResourceFinder(myClassPathResourceFinder);
>
> But still didn't work...
>
> Any other ideas??
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/load-resource-from-other-project-tp4656648p4656731.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: load resource from other project

Posted by "oliver.stef" <ov...@gmail.com>.
Hi,

Thanks for the replay!

Did it - added in Init(): 
resourceSettings.setResourceFinder(myClassPathResourceFinder);

But still didn't work...

Any other ideas??

Thanks!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-resource-from-other-project-tp4656648p4656731.html
Sent from the Users forum 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: load resource from other project

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Make GeneralResources a Maven dependency to WicketApplication, i.e.
general-resources.jar should be in wicket-application.war#WEB-INF/lib/
folder.
Then you can
use org.apache.wicket.core.util.resource.ClassPathResourceFinder to load
the resources


On Thu, Feb 21, 2013 at 3:57 PM, oliver.stef <ov...@gmail.com> wrote:

> Hi,
>
> How can I load external properties file from other project? (I have
> WicketApplication Project and another project named GeneralResources. I
> want
> to load properties file that from GeneralResources project into my Wicket
> project).
>
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4656648/GeneralResources1.png
> >
> tried to do:
> IResourceSettings resourceSettings = getResourceSettings();
>
>
> resourceSettings.addResourceFolder("C:\MyApplication\GeneralResources\Resurces\);
>
> but no success.
>
> Any ideas?
>
> Thanks
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/load-resource-from-other-project-tp4656648.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>