File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JNLP and Web Start and the fly likes JNLP downloads from JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "JNLP downloads from JSP page" Watch "JNLP downloads from JSP page" New topic

JNLP downloads from JSP page

Eric Sweeney

Joined: Dec 16, 2003
Posts: 5
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.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?
I agree. Here's the link:
subject: JNLP downloads from JSP page
It's not a secret anymore!