[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #QGG-522175]: arguments for a jnlp

Hi Yolanda,

> Since my laste mails asking you for support I have being making progress
> on configuring our thredds service.
> Now I have another problem that I cannot solve: I want to launch a home
> mede viewer: I have developed it and make a jnlp file which works well
> except this
> My jnlp launches a jar file which prints out the arguments given to it.
> I pass the {url} argument to my jnlp file in the catalog.xml
> <property name="viewer" 
> value="{url},oceantic"/>

> and gives the result:

> apparently this is what a want but the jar does not recognize
> "?";
> as an argument.
> If I run
> java -jar myviewer.jar  mytext
> it prints out
> mytext
> 1-How should I pass the argument Url to jnlp to be able to print out the
> url?

Try changing "{url}" in your viewer property to "url={url}". [You could also 
use "url={WCS}" if you always want the WCS access URL, or "url={OPENDAP}" if 
you always want OPeNDAP.]

The "{url}" gets replaced by the current dataset URL before the link is made on 
the web page. So you should get a link that looks like:

The JNLP template file will have any pattern that looks like "{NAME}" replaced 
by the value of the HTTP query parameter with the same name. So, in the case 
above, any occurance of "{url}" in your JNLP template file will be replaced by

The documentation on adding viewers is not very clear on this. I will work on 
rewriting the documentation:


> 2- If in the catalog.xml I want to send an argument directly to the
> getcapabilities request as this
> <property name="viewer" 
> value="{url}?request=GetCapabilities&version=1.0.0&service=WCS,
>  oceantic"/>
> It does not work because of ? and & characters. Do ypu know how can I
> solve this?

Similar to above, you need "url={url}". As for the ? and & characters, you 
could try to url encode them replacing "?" with "%3f" and "&" with "%26" like:


Hopefully, the resulting link will look like:


with the encodings still in place. Because then I would expect the "{url}" 
pattern in the JNLP template file to be replaced with the unencoded value. 
Which is, I think, what you want.

If that doesn't work, you might try replacing the "=" with "%3d".

If that doesn't work, we'll have to dig into the code and see where things are 
getting expanded.

Hope that helps,


> Best regards,
> Yolanda

Ticket Details
Ticket ID: QGG-522175
Department: Support THREDDS
Priority: High
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.