• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caching Problem with JNLP

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I have a JSP page running from an IE browser that open Java Web Start and downloads JNLP page. The code used is: response.setContentType("application/x-java-jnlp-file");
The problem I am having is that the JSP page caches itself in the Temporary Internet File (TIF)Directory on the user machines. On some machines (25%), the file will return an "Unable to Launch Application" error, due to some corruption in the Users TIF directory. The obvious solution is to delete the temporary internet file directory, but since we have a large user base, this is not a good solution.
I have added the following code to my header:
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.addHeader("Cache-Control","no-cache");
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setIntHeader ("Expires", -1); //prevents caching at the proxy server
response.addHeader("cache-Control", "no-cache"); //IE5.x only;
which doesn't cache to the TIF directory, but I get this error when trying to launch the page (http page, not a https page):
"Internet Explorer is unable to launch <jsp page> from <web-server>."
Which I believe is being caused by the "application/x-java-jnlp-file"..
Does anyone have a solution where I can launch this JSP page and not cache to the IE browser?
Thanks,
Eric
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I had the same problem!
Actually it's not the browser cache that is the problem, it's the Web Start cache.
I use these HTTP-headers in my JSP-file at the moment:
response.setHeader("Pragma", "no-cache");
//response.setHeader("Cache-Control", "no-cache");
response.setHeader("Expires", "0");
response.setContentType("application/x-java-jnlp-file");
The commented line causes the "Internet Explorer is unable to launch ...." -problem.
These lines prevent the browser from caching the jnlp-file.
To prevent the Web Start cache I just removed the href-attribute from the jnlp-tag in the file.
This have some implications but is OK for me!
Hope this helps.
/Waller

Originally posted by Eric Sweeney:
Hello all,
I have a JSP page running from an IE browser that open Java Web Start and downloads JNLP page. The code used is: response.setContentType("application/x-java-jnlp-file");
The problem I am having is that the JSP page caches itself in the Temporary Internet File (TIF)Directory on the user machines. On some machines (25%), the file will return an "Unable to Launch Application" error, due to some corruption in the Users TIF directory. The obvious solution is to delete the temporary internet file directory, but since we have a large user base, this is not a good solution.
I have added the following code to my header:
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.addHeader("Cache-Control","no-cache");
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setIntHeader ("Expires", -1); //prevents caching at the proxy server
response.addHeader("cache-Control", "no-cache"); //IE5.x only;
which doesn't cache to the TIF directory, but I get this error when trying to launch the page (http page, not a https page):
"Internet Explorer is unable to launch <jsp page> from <web-server>."
Which I believe is being caused by the "application/x-java-jnlp-file"..
Does anyone have a solution where I can launch this JSP page and not cache to the IE browser?
Thanks,
Eric

 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic