• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Show Document in Applet

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks!

My application has an applet that show URL documents.

When I open a document by AppletContext.showDocument(URL), it appears that caches the page on the client after the first page load. So, at the first time it works fine, but after that it is out of sync with my database...

What do I have to do to the applet always load the page from the server?

Thanks!
Joao Cunha
 
Bartender
Posts: 9566
12
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using IE to view your applet? Click on the Tools menu, select Internet Options and in the Temporary Internet Files section of the General tab, click on "Settings". There will be a setting for "Check for newer versions of stored pages" with four radio buttons. If the radio button "Never" is selected, my test applet/servlet combo exhibits the behavior you have described. If the setting is anything else, the app works as expected.
Another possability may be that your server keeps returning the same Last-Modified date for HTTP requests. That would tell the browser that it can safely use the cached version of the page. What app server are you using?
 
Joao Cunha
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Tomcat 5.
It just don't call the servlet again after the first time.

I got it work by removing the cache with javascript.
 
I can't take it! You are too smart for me! Here is the tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!