help needed in creating pdf file

Hi all,

I keep coming back to this question again. I chose iText over jasper reports to generate PDF files for some good reasons. in my application I

1. accept file uploaded by the user

2. process the data inside files and separate them into good data & bad data

3. put these good and bad data in a vector

4. pass it to a bean to write PDF files

5. files are stored in a application ROOT path under different folders based each data input (ex: each employer folder)

6. I delete these files from the application path

I go back to the data submit screen and start submitting for another employer. While processing for the next employer the system process data correctly and writes the PDF files into the appropriate folder, but t when the browser link that has the PDF get clicked, instead of current PDF, we still get the previous employer documents.

what to do?

please please somebody help me

hepzi

[978 byte] By [smallposta] at [2007-11-26 16:21:20]
# 1
It's a bit difficult to tell without code - are you saying the PDF generated is wrong, or the URL that leads to it is incorrect?
DavidKNa at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...
# 2

hey thanks for a quick reply

the PDF generated is correct when I check it manually in the folder where it physically saved the file (on a folder in the server)... but the link on the browser when I click on it shows the previous PDF which was created and got deleted in the previous upload...

It should be buffer, session or the server.. I would be glad to outline the code elaborately just now for your reference.

hepzi

smallposta at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...
# 3
Sounds like the browser is caching the PDFs and not requesting them. There are standard headers you write to the response to tell the browser not to cache a URL.
DrClapa at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...
# 4
I did indeed made sure the browser dosen't cache and I am using firefox
smallposta at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...
# 5
> I did indeed made sure the browser dosen't cache and> I am using firefoxThen you could install the Live HTTP Headers plugin into Firefox and use it to confirm whether your anti-caching instructions are working.
DrClapa at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...
# 6

hey folks

I have found out that every time the PDF file is downloaded, in the firefox download manager, that opens up to show the status of the downloaded PDF, when I click on the "Remove"

button once I open the much needed PDF, the PDF is not carried onto the next upload for some reason... but I still need to investigate in Netscape and see how it works..

thanks guys

I will come back to update you once I test it in netscape navigator

hepzi

smallposta at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...
# 7
also, just so you know -- iText is part of jasperreports.
den2681a at 2007-7-8 22:45:00 > top of Java-index,Java Essentials,Java Programming...