I've noticed a curious thing while trying to dynamically generate JNLP files based on URL parameters passed to a HTTP server. If I have something like this in my HTML code, it works:
<embed type="application/x-java-applet;" launchjnlp="dummy.jnlp"/>
If on the other hand I have a %
character in the launchjnlp
attribute, the plugin simply won't do anything:
<embed type="application/x-java-applet;" launchjnlp="dummy%3f.jnlp"/>
No error messages, no default Java splash screen, nothing, it silently fails. (Without even attempting to retrieve the JNLP file.)
Is this some kind of security feature? If it is, what is it supposed to guard against?
Or could it be a straightforward bug?
Update: Using the %
entity instead of a %
sign doesn't work either.
Update 2: I tried and failed to find any documentation on the exact semantics of the launchjnlp
attribute, but the entire tag is generated by deployJava.launchWebStartApplication(jnlp), which is supposedly the "official" way of launching a Web Start application from a browser.
Update 3: Just to be absolutely crystal clear about this: the above example is just that: an example. You can observe the described behaviour with absolutely any URL (relative, absolute, file://, http://, you name it), any url-encoded character, or even an invalid escape sequence (though in that case it's more or less justified), the existence or absence of an actual JNLP file is irrelevant, because we don't even get to the point where the plugin would attempt to load the JNLP file.
%
? – Coat%3f -> ?
in this case), things break. Note that the behaviour is same regardless of whether I provide a valid escape sequence or not, sodummy%.jnlp
will also fail. – Mimicry?
to_3f
,_
to_5f
etc? Having question marks in file names seems like something that may fail / cause trouble at many levels.... – Laborhttp://.../something.jnlp?param=<url encoded string>
. And yes, the workaround was to use my own non-standard method of escaping (well, base64), but the question is about why am I forced to do this. – Mimicry%
character in the URL. – Mimicry%3F
in the first place? Why not?
? – Handedness%
character anywhere, it stops working. – Mimicry