custom JnlpDownloadServlet: JAR downloads occur twice?

I've implemented a custom version of the JnlpDownloadServlet, because I primarily want my own handling of the URL query string. I have it setup to handle both JNLP and JAR downloads and all seems to work - the JNLP apps and JARs download then start and that is good.For simplicity I initially left out jar-diffing, versioning as well as pack200 handling, but decided to try including pack200 handling just now.Again, I seem to have it running fine, but, in the process of setting this up, I found (by displaying the DownloadRequest within the servlet's handleRequest method) that the JNLP client (Web Start) appears to be:

1) on an initial JNLP application launch, requesting each JAR twice

2) on subsequent JNLP launching (with no cache clear), requesting each JAR once more

In each case, the pack200 JAR is found and sent.As far as I can tell, Web Start is functioning ok, but I am mystified by this apparent multiple and repetitive downloading of JARs. Is this expected behaviour?Is it something that I need to take care of, like maybe with some sort of versioning or whatever? Is there some sort of debug tracing I can set in the Web Start client to see what's going on?

[1202 byte] By [RussellEasta] at [2007-11-26 20:41:44]
# 1

Looks like I get to answer my own. J

I noticed JnlpDownloadServlet does not implement doHead(). It would make sense if it were, so I tried implementing it within my own servlet, and once deployed, noticed that Java Web Start client uses HEAD requests frequently, so this all makes sense now from point of view of Web Start.

But it looks like there is an omission within JnlpDownloadServlet - it needs a doHead() implementation. Consequently, anyone using JnlpDownloadServlet out of the box from Java 5 and 6, will be causing Web Start clients that use their deployment to *always* get JARs whether they are in local jar cache or not. I suppose that Web Start client tries HEAD request first, and gets nothing, and so tries GET request.

RussellEasta at 2007-7-10 2:00:35 > top of Java-index,Desktop,Deploying...