Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Show Document in Applet

 
Joao Cunha
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
 
Joe Ess
Bartender
Posts: 9340
10
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic