Instead of putting the timestamp in the filename, just add it as another URL parameter ie:
/download?file=YourFile.pd
But jwenting is right :-)
Main Topics
Browse All TopicsTools Used :
Websphere Application Server 6.0
AS/400 v5r4
DB2 UDB
I am working on the web project which includes the reports to be generated in pdf format.
I am using RPG ILE programm to generate the report, which generates the real time report
and over write it into a specific folder (Library on AS/400) . Users access these files using
a jsp page with the help of various links to these pdf reports.
The first report generated can be fetched by user correctly. However, when user clicks the link with other searh parameters, it shows same old pdf file while the file on server is ovr written by the program.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hello jwenting and TimYates,
Thank you for yor time.
I have restriction about the file name , so can not change it.
I have changed the expiry headers to exact system time and also
added a query string parameter as the time instance so that the
letters in the query string will always change. However, the problem
still persist.
Thank you again for your time.
Rahul Ashar.
try one more thing: clear the browser cache and try again. If you're now getting a new file it's the browser, not some proxy or appserver.
btw., are you using some caching solution in your application? Either implicitly or explicitly that might be the reason.
For example, I used to maintain a web application that created stock charts. It used a servlet filter to cache outgoing charts and retrieve from cache charts it knew about.
Saved a lot of CPU time and database operations, but required some careful configuration to avoid caching things for too long as different charts might be valid for anything from under a minute to over a day.
Hi jwenting,
After clearing the catche (browser'sold fiels ) it shows the new file.
I have a list of different reports generated at single click.
and the general trend of user is that they need to go thr' all the
reports. So. I can not ask user to close or clear the browser before
clicking each link.
Rahul
Hello guys,
I am sorry for this late reply.
I have done a very stupid thing to get it worked. I am sure that what I have done is theoritically not a good idea (complete non sense , but works).
I have used the timestamp as first parameter in the
query string and filename as second. e.g.
download?t=3494723947924&f
I am surprised to see that it started working as easy as a mentioned above by TimYates. (I am aware that the query string sequence should not matter, but I got my solutions). The headers set with an exact expiery time worked fine on IE7.
It worked for other parts of the web application where the previous page histiry should be eliminated.
Thank you very much.
Rahul Ashar
GN Solutions Pvt Ltd.
Business Accounts
Answer for Membership
by: jwentingPosted on 2009-08-07 at 00:06:46ID: 25040417
Most likely there's a caching proxy in the middle that ignores your no-cache parameters.
We've had that problem in the past, the only way to ensure it won't happen is to have the returned file have a different name each time.
That can be achieved by including a timestamp in the filename (for example).
Also you can try to set the expiry headers to the exact system time (use GMT). That might be accepted by servers that refuse to acknowledge 0 or -1.