users@glassfish.java.net

Re: Glassfish + JSF + stream pdf to output -- please sun guys...help!!!

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 15 Nov 2006 22:38:49 -0800

Hello Derrick,

Derick Potgieter wrote:
> Hi,
>
> Has any one done this...streamed a dynamic pdf to output on browser?
> I`ve done this on 8.2 by sending the page to a servlet on the page
> navigation. Then called the request.getOutputStream().write(...).
>
> Now this seemed to work perfectly...until i upgraded to glassfish
> where i think JSF 1.2 is screwing me up....now i havent selected it to
> be included in Netbeans 5.5 + web pack. But i recon the server
> obviously includes it because of enterprise 5 compatibility.
>
> Now i`ve tested it by creating a new web app without JSF support and
> streaming from there in a servlet....and this works like a dream.
> But using the same library and code in the JSF app gives me the pdf 19
> pages big....but nothing in it.
>
> I`ve compared the file from the servlet without JSF framework....and
> it is different to the one (some characters are different, but the
> general layout is the same.)
>
> Is there maybe a rule in the new JSF 1.2 specification that doesnt
> allow you to swap from your action class to a servlet....or mabe
> doesnt allow you to stream out....or mabe changes the bytes in a
> teleporter and then doesnt output write.
>
> Please....can anyone look at this....please??
>
> I`m now at the point of just making a small JSF app and streaming out
> via a servlet to check if it is the JSF stuff causing crap....this
> same approach works in a plain jsp+servlet app.
>
> Thanks for all the reading..
I've been able to reproduce your issue using 1.2_02. The good news is
1.2_03 (still in RC stages) seems
to resolve the issue.

You have a couple of choices:

   1. Download and test with the latest GF V2 builds (build 24 or later)
   2. Go to https://javaserverfaces.dev.java.net and click the download
        link for JSF 1.2_03 RC3. This link will take you to the download
        location which has the standalone JARs as well as an updater
        which will upgrade your existing GlassFish installation with the
new JARs
        (instructions for it's use are outline there)

If the 1.2_03 RC version of JSF doesn't resolve your issue, let us know.

Thanks,

-rl
>
> Rgds
> Derick
>
>