Back Midas Rome Roody Rootana
  Root Analyzer Framework  Not logged in ELOG logo
Entry  10 Mar 2016, Thomas Lindner, Info, web display of MIDAS data using rootana+THttpServer 
    Reply  25 Jan 2017, Thomas Lindner, Info, web display of MIDAS data using rootana+THttpServer 
       Reply  26 Jan 2017, Pierre Gorel, Info, web display of MIDAS data using rootana+THttpServer 
       Reply  03 May 2017, Alberto Remoto, Info, web display of MIDAS data using rootana+THttpServer 
          Reply  03 May 2017, Thomas Lindner, Info, web display of MIDAS data using rootana+THttpServer 
             Reply  09 May 2017, Konstantin Olchanski, Info, web display of MIDAS data using rootana+THttpServer 
                Reply  10 Mar 2020, Konstantin Olchanski, Info, web display of MIDAS data using rootana+THttpServer 
Message ID: 8     Entry time: 03 May 2017     In reply to: 7     Reply to this: 9
Author: Thomas Lindner 
Topic: Info 
Subject: web display of MIDAS data using rootana+THttpServer 
> 
> Hi Thomas,
> 
> > All details on setting up that example are here:
> > 
> > https://midas.triumf.ca/MidasWiki/index.php/Rootana_javascript_displays#Custom_web_display
> 
> I am trying to test the webdisplay but I am not sure which would be the path:
> 
> I start the  THttpServer with:
> 
> $ ana.exe -r9091
> 
> But on the url:
> 
> http://localhost:9091/
> 
> I find just the default browser provided by JSROOT, while nothing is found on:
> 
> http://localhost:9091/CS/webdisplay
> 
> Where am I supposed to find the custom webdisplay provided by you?

Hi Alberto,

I have added some additional details to the MediaWiki page that you referenced above.  The main point is as follows:

1) You need to setup a custom MIDAS webpage to point towards the example code in 
rootana/examples/html/generic_webdisplay.html
This means you need to add new entries to the ODB directory /Custom

2) The 'same-origin policy' means that you need to setup some sort of proxying so that the custom web page can access the 
ROOT webpage.  So, let's suppose in your case that you had the following ports for web servers:

ROOT webserver: localhost:9091
MIDAS webserver: localhost:8081

so in that case you would want to setup an APACHE proxy so that

localhost -> localhost:8081 (for the MIDAS server)
localhost/rootana -> localhost:9091 (for the ROOT server)

then the custom page would be available at

localhost/CS/webdisplay

Please read my updated documentation and see if this makes any more sense.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
ELOG V3.1.4-2e1708b5