Java webstart redownloads jnlp when query string is present in url

I use tomcat to serve webstart applications. I have a servlet writing jnlp based on the URL sent to tomcat so that the argument is passed to main. When you request jnlp without the query string, I see that tomcat starts jnlp once, but as soon as I add the query string in url, I see that tomcat performs the jnlp function twice:

0:0:0:0:0:0:0:1 - - [08/Nov/2012:09:10:44 -0600] "GET /javastart/testapp.jnlp HTTP/1.1" 200 2062 

vs.

 0:0:0:0:0:0:0:1 - - [08/Nov/2012:09:01:48 -0600] "GET /javastart/testapp.jnlp?56 HTTP/1.1" 200 2103 127.0.0.1 - - [08/Nov/2012:09:01:48 -0600] "GET /javastart/testapp.jnlp HTTP/1.1" 200 2062 

If I remove the href attribute of the jnlp element, this will not happen. This leads me to believe that webstart for some reason is requesting a jnlp file. Is it correct? If so, why?

+4
source share
1 answer

I could not find reliable documentation on this, but it seems to be closely related to the href attribute of the jnlp tag and how webstart ensures that it has the latest jnlp. If the url in the generated jnlp does not match the url used for the initial request, webstart will again request jnlp using the url from the jnlp tag from the loaded jnlp. In our setup, the href attribute in the jnlp tag was static and was not generated to match the attributes passed in the query string. Since the jnlp url given by webstart is different than the URL found in jnlp again requested jnlp, but without the query string.

+1
source

Source: https://habr.com/ru/post/1444844/


All Articles