Take a look at DynamicWebResource

If you need an example, look at the wicket-contrib-jasperreports code
in wicket-stuff svn.

Martijn

On 1/3/07, Thullner, Robert <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello
>
> I store a lot of MS Word and Excel files as a byte[] into my database.
> I want to add a feature to download these files from the database again, but
> I did not find a way to do this in Wicket, without writing the byte[] to a
> File again.
>
> Is there a way to write a byte[] to a WebResponse? I tried the same Code,
> which is available at the Export Example from Wicket
>
> I got my byte[] from the database and then wrote it to a
> ByteArrayOutputStream.Then I used the toString() method. But if I download
> the file then I get a lot of conversion errors from MS Word, so I would like
> to write the byte[] directly.
>
> So I tried this method: response.getOutputStream().write(file);
> But using this I get this error:
> java.lang.UnsupportedOperationException: Cannot get output
> stream on BufferedResponse
>
> Thanks for any help
> Robert
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to