0

I develope a GWT-application which creates a PDF-file at the server, and then transferres it to the client. At the client-side, a window appears which allows the user either to

  • open it with a program assigned to the file name ending, or
  • save it to disc.

I have read several threads to this topic, such as

and that helped me coding the doGet()-methode in my print-servlet like this:

resp.setContentType("application/octet-stream");
resp.setHeader("Content-Disposition:", "attachment; filename=\"" + fileName + "\"");  

This works fine when testing and debugging using the local GWT-developement server.

But my big problem is:
After deploying to GAE and running the code on GAE, the created pdf-name is not transferred to the client...!

Instead of e.g. TestPdf-25072016.pdf, the name only consists of the word print.

This leads to the fact that the standard-program for a PDF is not invoked automatically when I want to open it. And, of course, print is not the name of the PDF I want to have...

Where is my failure? Especially I am confused that everything works fine when using the local developement server?

Thanks a lot for your support!

Community
  • 1
  • 1

1 Answers1

0

You could use a tool like Wireshark or Fiddler to capture the actual HTTP header sent to you when you call printing in GAE. Maybe GAE is adjusting the header or just blocking it.