On Fri, May 28, 2010 at 4:46 AM, Alex Zeit <[email protected]> wrote:
> Dear All,
> I would like to create some binary files, zip them and start download in
> one
> step.
> I started with the functionality to create files depending on form input:
>
> form.add(new Button("button1", new Model("Download")) {
> @Override
> public void onSubmit() {
> new MyFileCreatror().createBinaryFile("myfile.bin")
> }
> });
>
> Tomcat log:
> May 28, 2010 10:50:08 AM java.util.prefs.FileSystemPreferences$2 run
> WARNING: Couldn't create user preferences directory. User preferences are
> unusable.
> May 28, 2010 10:50:08 AM java.util.prefs.FileSystemPreferences$2 run
> WARNING: java.io.IOException: No such file or directory
>
>
> How do I define a place where files to be created?
> Is there another approach to create and zip files?
>
> Any help would be highly appreciated,
> Alex
>
This has nothing to do with Wicket - it's just simple java file permissions.
And we would have to see the code in your file creator (or,
"MyFileCreatror") to help. But it's something specific to your file
permissions - and possibly tomcat config to allow writing to certain
directories. You should probably try to write to the temp directory with
File.createTemp.....
--
Jeremy Thomerson
http://www.wickettraining.com