• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Caching problem

 
Sachin Adat
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you disable caching when using the <APPLET> tag or while using the deployJava.runApplet function for loading latest jre and loading the applet?
I am able to disable caching using the <OBJECT> and <EMBED> tags. Don't know how to use it while using deployJava.js?
I also saw deploying applets using Java Network Launch Protocol (JNLP).
Is this the way to go?

The applet that I deploy becomes a sticky applet and it does not reload even when the jar file is changed..........
Do I have to change the declaration of the applet every time changing something in it or do I have to change something in my class.........
Does serialVersionUID have something to do with this?

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The applet that I deploy becomes a sticky applet and it does not reload even when the jar file is changed. Do I have to change the declaration of the applet every time changing something in it or do I have to change something in my class.

That's odd. Does the browser ask for the jar file each time the applet is started? Looking at the messages in the Java Console and your server access logs should tell you. If the server returns a 304 status for the jar file even though it is changed, then that's the problem - maybe the date on the newly changed jar file is incorrect.

Does serialVersionUID have something to do with this?

No.
 
Sachin Adat
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the browser ask for the jar file each time the applet is started?

How do I know this? I can't say whether it is asking or not...but it is surely not getting the latest jar(I've checked the java console).
If the server returns a 304 status for the jar file even though it is changed, then that's the problem - maybe the date on the newly changed jar file is incorrect.
How do I find what status is returned by the server? The server side is done in PHP. I don't know much about it.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java Console should have a line in it that indicates which file the JVM is trying to download.

The definite answer would be in the server access logs. It would indicate which files are requested, and what response the server sends (200, 304 or something else).
 
Sachin Adat
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The Java Console should have a line in it that indicates which file the JVM is trying to download.

Didn't get this line........
Ulf Dittmer wrote:The definite answer would be in the server access logs. It would indicate which files are requested, and what response the server sends (200, 304 or something else).
But, this was 200. Then I checked the modified date and it was the old jar's modified date. Don't know why it is not changed. We are using Winscp for transferring files. So, I guess there is some problem with that. I'll always check if the modified date is changed to get clear results.

Thanks for the help. Very helpful.........

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know what the Java Console is? It's a little client-side window that shows what's going on in the JVM.
 
Sachin Adat
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Do you know what the Java Console is? It's a little client-side window that shows what's going on in the JVM.

I think yes........but after you asked I am not that confident because I cannot see the line in it that indicates which file the JVM is trying to download.

The window name is "Java Console". I open it by right-clicking the java icon on the tray and clicking "Open 1.6.0_13 Console"
All it shows is this

Java Plug-in 1.6.0_13
Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
....
....
....

Is there any other console that I need to check......
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's what I'm talking about. But as I said "there should be a message" - I see it in mine, but apparently different JVM versions behave differently.
 
Sachin Adat
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:but apparently different JVM versions behave differently.

Maybe you are right.......Is your os not windows(mine is).
Maybe, because of that the JVM's behave differently.

Thanks again for your help..........
The behaviour was quiet a mystery to me for a few days. Now I know what was the problem.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic