Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

How does java web start cache parameters?

I am running a java web start app, and I am passing a parameter to the app from my jnlp file. My jnlp file is generated by php so my code looks something like this:
$gProductID = intval($_COOKIE["productRef"]);
<jnlp ... >
...
<application-desc main-class="reading.RGReading">
     <argument><?=$gProductID?></argument>
</application-desc>
</jnlp>
This works just fine the first time I run it, but it seems from then on, it will run as though the same value I originally sent, is sent every time. In other word, if I run with value 14 the first time, it will run every time as though value 14 was sent, even though I have $gProductID set to another value like 16.
I found if I delete the sun java deployment cache, it lets me rerun with a new value. Obviously I can't expect users to clear their caches all the time so a solution is needed. Does this have to do with the cache? If so, how do I get around it? Or something else causing the problem?
Thanks for helping!
0
rainglen
Asked:
rainglen
  • 2
1 Solution
 
objectsCommented:
try adding a dummy parameter to the jnlp request or disable caching of the jnlp on your server

abc.jnlp?dummy=20070706123456

timestamp makes a good dummy var
0
 
objectsCommented:
0
 
rainglenAuthor Commented:
Thanks for the help. I'm investing if version is an issue. According to sun forums, it seems that browser caching may also be an issue to contend with. See http://forum.java.sun.com/thread.jspa?threadID=592749&messageID=3662528 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now