use Window.open("/pdfUrl", "_blank", ""); in gwt to call the servlet, in
servlet write the code for generating pdf.
On Fri, Sep 2, 2011 at 8:44 PM, Uemit <[email protected]> wrote:
> So you want to send some data to the servlet and want to display a PDF
> (which is generated by the servlet based on the data sent) in the browser?
>
> There are two ways of how to do it:
>
> 1.) Using RequestBuilder you could generate a AJAX call to your Servlet (as
> you did it). However in the callback method of the RequestBuilder you will
> get the response from the servlet (probably the PDF binary data) and then
> you could use that to open a new window with the binary PDF data.
>
> however I think the easier approach is the following:
>
> 2.) Have either a form or a URL which points to the URL of the servlet
> responsible for generating the PDF. The data you want to pass to the servlet
> can bei either passed by POST (form) or GET (url) and in the servlet make
> sure that response headers are set properly (application/PDF).
>
> second appraoch is easier.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/YleAom9t2JQJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
--
Regards
Suresh Babu G
<http://www.accountingguru.in/>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.