You mean you want Wicket to serve up files from outside of your webapp
directory? We do that at work with images. I just created a special
image resource class that basically just streams back the file
contents from the disk. Try something like this:
public class FileImageResource extends DynamicImageResource
{
private static final long serialVersionUID = 1L;
private final String path;
public FileImageResource( File file, String format )
{
super(format);
this.path = file.getAbsolutePath();
setCacheable(true);
setLastModifiedTime(Time.valueOf(file.lastModified()));
}
protected byte[] getImageData()
{
return FileUtils.getFileContents(new File(path));
}
}
On Sat, Aug 30, 2008 at 6:15 AM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I want to mount files
>
> c:/myFolder/files/..... so that I can get it in wicket and from my html.
> like /Files/......
>
> Can wicket do this for me? Pointers?
> --
> View this message in context:
> http://www.nabble.com/Mount-files-outside-container-tp19232069p19232069.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]