Hi,

See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
Create a custom ResourceReference and mount it. Then use
RequestCycle#urlFor() to get the relative url to it and pass it to Include

Martin Grigorov
Wicket Training and Consulting


On Fri, May 9, 2014 at 5:12 PM, Mikulicic, Vladimir <
vladimir.mikuli...@br.de> wrote:

> Hello,
>
> im using Wicket 6.15
>
> Does someone know how to  include a static HTML file from the filesystem
> in my Wicket-App.
>
> I have a folder on my machine like /local/wtr/   with two files
>  header.html   and footer.html in it.
> The files are not in the docroot of my server, but somewhere in the
> filesystem.
>
> I would like to include these Files with:
>
> new Include("include", "header.html");
>
> My approach is:
>
> getSharedResources().add("extern", new FolderContentResource(new
> File("/local/wtr")));
> mountResource("/resource/", new SharedResourceReference("extern"));
>
> But I don’t know how to use it  with  new Include()?
> How to get the correct path to the header.html?
>
> Any help would be fine. Thanks a lot!
>
> Vladi
>
>
>
>
> --------------------------------------------------------------------------------------------------
> Bayerischer Rundfunk; Rundfunkplatz 1; 80335 München
> Telefon: +49 89 590001; E-Mail: i...@br.de; Website: http://www.BR.de
>

Reply via email to