JNLP file not being updated when accesed via Desktop Shortcut
843802May 20 2005 — edited Jun 5 2005It appears as though when one comes from a shortcut, the most recent copy of the JNLP is not read regardless of timestamp or headers.
I have a href in my jnlp element so that I may have a desktop shortcut. My application is not allowed offline. I am using versioning with timestamp in the JNLP (JNLPDownloadServlet with Tomcat, I'm using jdk 1.5.0_03). I update the timestamp in the JNLP, and I update the version number of a jar by copying the old version and adding a version number string. I am using JNLPDownload servlet with version based download in Tomcat. If I add a new property or jar file or modify versions none of this is picked up when I come from a shortcut however all of it is picked up when I hit the jnlp directly via a browser link.
This causes several problems. I cannot reliably depend that a newly added jar , a new version of an existing jar or a new property will be picked up. Note I am not chaning parameters on the href , the jnlp href is the same other parameters including propertys , jar files , also new versions cant be read and so jardiffing wont take place.
I also send the headers (that I have seen in various other posts)
response.addDateHeader("Date", Calendar.getInstance().getTime().getTime());
response.addDateHeader("Last-Modified", Calendar.getInstance().getTime().getTime());
response.setHeader("Cache-Control", "must-revalidate");
response.setHeader("Expires", "Mon, 26 Jul 1990 05:00:00 GMT");
No jar diff is performed (viewing the jnlpdownloadservlet.log) if I come form the shortcut, however it is if I come from the web link directly I suspect because the JNLP is not being properly read on the client side. It appears in the jnlpservlet.log as if the new jnlp is sent by the server however it is not being read by the client when the client is invoked via a shortcut, although it is picked up when coming from a browser.
I can show the console output if anyone wants to see it.
Why would there be different behavior if you come from a link vs. the shortcut for an application that is not allowed to run offline.
I think this is related to... http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6189106
Is this a bug that I can expect to be fixed should I file a bug report?
Im thinking of making a seperate application which just calls BasicService.showDocument(myapp.jnlp). So that the new jnlp is run everytime as a workaround. I will then have a shortcut for that app and not one for my "real" app.
I think there should be a way to specify that the shortcut goes to the actual http:// url.jnlp instead of going to the cached version. Perhaps this could be added to the shortcut element in the jnlp. In the meantime is my workaround above the only way to resolve this for now? Or am I missing something?