Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Delay in showing PDF file  RSS feed

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A little bit more complicated than the title suggests...
Basically I have an app that allows the user to view the PDf version of a report.
If the file doesn't exist or older than the data, create the PDF file first, store it in the file system, before sending it to the browser.
The problem is, after the app creates the new file and stores it to the file system, the browser only shows a blank page. Only after a refresh does the PDF file shows up.
The above only happens if the file has to be created first before being sent to the browser. Existing files work perfectly.
How to make sure that the browser shows the PDF file everytime regardless whether it is an old or new file? A sleep()?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!