Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Show Document in Applet  RSS feed

 
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: 9559
12
Linux Mac OS X 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.
 
Where all the women are strong, all the men are good looking and all the tiny ads are above average:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!