> To cut the problem from the source... Do you need to have a file in the
> file system?
>
> We are using a DynamicWebResource that answers a PDF directly from memory.
> Here some code:
>
>    // we have a method that generates the PDF as a byte[]
>    final byte[] thePDFInBytes = generatePDF();
>
>    Resource cResource = new DynamicWebResource() {
>       protected ResourceState getResourceState() {
>          return new ResourceState() {
>                public String getContentType() {
>                   return "application/pdf";
>                }
>                public byte[] getData() {
>                   return thePDFInBytes;
>                }
>             };
>       }
>    };
>

Looks like a fine approach to me. Though it would probably even be
better if you could just stream it (use WebResource directly).
ResourceState is a construct that allows for caching, but you probably
don't need that in this case.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to