You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eric Reagan <re...@gmail.com> on 2010/02/26 19:33:00 UTC

How to keep language .properties file in a separate folder from the html pages

I would like to keep my .html files in a seperate folder from the language
files and I was wondering how to do this? I keep my html files in
html/main/*.html and my language .properties files in
language/(languageName)/*.properties. I tried adding the following to my
MyWebApp. When I try and run my app there is a location error about not
being able to find my .properties file. I was wondering if anyone knew how
to fix/resolve this or if it would be better just to keep the .properites
file in the same directory as the html file.

    @Override
    protected void init()
    {
        super.init();
        IResourceSettings resourceSettings = getResourceSettings();
        resourceSettings.addResourceFolder("html/main");
        resourceSettings.addResourceFolder("language/en-us");
        resourceSettings.addResourceFolder("language/esp");
          .............
        resourceSettings.setResourceStreamLocator(new
PathStripperLocator());

    }

-- 
Eric Reagan

Re: How to keep language .properties file in a separate folder from the html pages

Posted by Igor Vaynberg <ig...@gmail.com>.
when such an error happens, as part of it there is a message that
tells you to enable a resource logger to see all paths tried. what
does that output?

-igor

On Fri, Feb 26, 2010 at 10:33 AM, Eric Reagan <re...@gmail.com> wrote:
> I would like to keep my .html files in a seperate folder from the language
> files and I was wondering how to do this? I keep my html files in
> html/main/*.html and my language .properties files in
> language/(languageName)/*.properties. I tried adding the following to my
> MyWebApp. When I try and run my app there is a location error about not
> being able to find my .properties file. I was wondering if anyone knew how
> to fix/resolve this or if it would be better just to keep the .properites
> file in the same directory as the html file.
>
>    @Override
>    protected void init()
>    {
>        super.init();
>        IResourceSettings resourceSettings = getResourceSettings();
>        resourceSettings.addResourceFolder("html/main");
>        resourceSettings.addResourceFolder("language/en-us");
>        resourceSettings.addResourceFolder("language/esp");
>          .............
>        resourceSettings.setResourceStreamLocator(new
> PathStripperLocator());
>
>    }
>
> --
> Eric Reagan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org