[ome-users] insight.jnlp and Nginx redirection

Mark Woodbridge m.woodbridge at imperial.ac.uk
Mon Feb 4 09:29:25 GMT 2013


When we originally wrote the jnlp files we served them as JSPs, thus 
removing the hardcoded URLs but adding a dependency on a servlet 
container (example below). I guess the same approach could be achieved 
using Django but I didn't attempt that.

Mark.



<%@ page contentType="application/x-java-jnlp-file" %>
<?xml version="1.0" encoding="utf-8"?>
<jnlp
   codebase="<%= request.getRequestURL().substring(0, 
request.getRequestURL().lastIndexOf("/") + 1) %>"
   href="<%= 
request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/") 
+ 1) %>">
   ...
   <resources>
     <j2se version="1.5.0+" max-heap-size="256m"/>
     <jar href="omero.insight.jar"/>
     <jar href="config.jar"/>
     <jar href="libs/xalan-2.7.1.jar"/>
     ...
   </resources>
   <application-desc/>
</jnlp>



On 01/02/13 15:51, Will Moore wrote:
> Hi Julien and Niko,
>
> Thanks for your feedback and input. I have created a ticket for this issue:
>
> https://trac.openmicroscopy.org.uk/ome/ticket/10273
>
> Cheers,
>
> Will.
>
>
>
> On 1 Feb 2013, at 14:20, Niko Ehrenfeuchter wrote:
>
>> On 01.02.2013 15:12, Niko Ehrenfeuchter wrote:
>>> On 01.02.2013 15:09, Julien Jourde wrote:
>>>> Hi Omero-users,
>>>>
>>>> I just installed a 4.4.5 omero server in my lab. Everything's fine
>>>> except when I try to launch Insight using the jnlp protocol.
>>>>
>>>> The problem seems to come from the redirection of the port 80 to the
>>>> port 443 in nginx.
>>>>
>>>> I'm using "rewrite ^ https://$server_name$request_uri? permanent;" in my
>>>> omero.conf file to accomplish that. But the jnlp file can't deal with
>>>> that. It contains urls like
>>>> "http://my.omero.server.fr/webstart/jars/insight.jnlp" where it shoud be
>>>> "https://my....". Launching the jnlp leads to a launchfile error because
>>>> it tries to charge a web page unproperly created by nginx (see below).
>>>>
>>>> Did I made something wrong by using redirection rules ? Is there a way
>>>> to do it more properly ?
>>
>> apparently we do have an exception for webstart in the rewrite rules:
>>
>>> if ( $uri !~ ^/webstart/jars/insight.jnlp ) {
>>> rewrite ^ https://$server_name$request_uri? last;
>>> }
>>
>> This workaround seems to get things going here, but anyway I think the
>> hardcoded "http" in the jnlp file should rather get fixed.
>>
>> Cheers
>> Niko
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> <mailto:ome-users at lists.openmicroscopy.org.uk>
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list