This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Yolanda, > Since my laste mails asking you for support I have being making progress > on configuring our thredds service. http://150.241.234.101:8080/thredds > > 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="http://150.241.234.101:8080/thredds/view/launch.jnlp?{url},oceantic"/> > > and gives the result: > > http://150.241.234.101:8080/thredds/view/launch.jnlp?http://150.241.234.101:8080/thredds/wcs/OP_DATA/MODIS1km/20090311.nc > > apparently this is what a want but the jar does not recognize > > "?http://150.241.234.101:8080/thredds/wcs/OP_DATA/MODIS1km/20090311.nc" > > 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: http://150.241.234.101:8080/thredds/view/launch.jnlp?url=http://150.241.234.101:8080/thredds/wcs/OP_DATA/MODIS1km/20090311.nc 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 http://150.241.234.101:8080/thredds/wcs/OP_DATA/MODIS1km/20090311.nc The documentation on adding viewers is not very clear on this. I will work on rewriting the documentation: http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/Viewers.html > 2- If in the catalog.xml I want to send an argument directly to the > getcapabilities request as this > > <property name="viewer" > value="http://150.241.234.101:8080/thredds/view/launch.jnlp?{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: launch.jnlp?url={url}%3frequest=GetCapabilities%26version=1.0.0%26service=WCS Hopefully, the resulting link will look like: launch.jnlp?url=http://150.241.234.101:8080/thredds/wcs/OP_DATA/MODIS1km/20090311.nc%3frequest=GetCapabilities%26version=1.0.0%26service=WCS 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, Ethan > > Best regards, > > Yolanda Ticket Details =================== Ticket ID: QGG-522175 Department: Support THREDDS Priority: High Status: Closed