You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by "Wood, Dean Jr (GE Oil & Gas)" <De...@ge.com> on 2015/08/04 14:10:39 UTC

Path where server can be found

I have a html chart that I want to present in zeppelin. I do this by using println(s”””%html”””+text) where text is a html file that has been put into a string using java.io. This works when the data can be put in a string in the html string in the text variable. However, when the html file wants to pull data from a file it doesn’t work because I don’t know where to put it. I get the error 
<h2>HTTP ERROR 404</h2>
<p>Problem accessing /irisdataorig.csv. Reason:
<pre>    Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>    

So the question is, where do I put my data file, and what string goes into the html so that it can be loaded by the html string in zeppelin?

Thanks

Dean


Re: Path where server can be found

Posted by "Wood, Dean Jr (GE Oil & Gas)" <De...@ge.com>.
I think point two is my question. Where does the file have to be? It isn't just zeppelin-web directory because I've tried that. So where do I have to put the file so that it can be reached by html input with a println command?

Thanks

Dean.

Sent from my iPhone

On 4 Aug 2015, at 19:45, Corneau Damien <co...@gmail.com>> wrote:

If you use the path /irisdataorig.csv in your html file, then the path is relative to the web server (file is expected to be reachable by anybody so on the webserver.

So you have a few ways:
1) The csv file is hosted somewhere so public access (http://mydomain.com/myfile.csv<https://urldefense.proofpoint.com/v2/url?u=http-3A__mydomain.com_myfile.csv&d=AwMFaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=C6rdvMYZDOvgGg5mqGWcidO2RK8DHopadY7gNniB1Do&m=CuYfs91GYtnHIg1Lx-tqha4Ic1uwbGdTh2YH0A-SeNU&s=pcVJxtUcqdzlEHEC5da9RM8SYthj7hMsu8XNWK012Fo&e=>)
2) The csv file is in the zeppelin-web webserver folder (copied through shell interpreter for example)
3) The csv content is injected in the HTML somehow, for example: println(s”””%html”””+ file1 + datacsv + file2)
(you can look at this example that is doing something similar: https://beta.zeppelinhub.com/#/notebook/dcorneau/2AW72S1F8<https://urldefense.proofpoint.com/v2/url?u=https-3A__beta.zeppelinhub.com_-23_notebook_dcorneau_2AW72S1F8&d=AwMFaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=C6rdvMYZDOvgGg5mqGWcidO2RK8DHopadY7gNniB1Do&m=CuYfs91GYtnHIg1Lx-tqha4Ic1uwbGdTh2YH0A-SeNU&s=O3lwuUcyDKuSa4gVqs0-NH43lx6K87De0rhTzV9G938&e=>

On Tue, Aug 4, 2015 at 9:10 PM, Wood, Dean Jr (GE Oil & Gas) <De...@ge.com>> wrote:
I have a html chart that I want to present in zeppelin. I do this by using println(s”””%html”””+text) where text is a html file that has been put into a string using java.io<https://urldefense.proofpoint.com/v2/url?u=http-3A__java.io&d=AwMFaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=C6rdvMYZDOvgGg5mqGWcidO2RK8DHopadY7gNniB1Do&m=CuYfs91GYtnHIg1Lx-tqha4Ic1uwbGdTh2YH0A-SeNU&s=j2AS7O2wypT2IgjZfoDHvQ8iv7Mwtd7IL0QbGQta780&e=>. This works when the data can be put in a string in the html string in the text variable. However, when the html file wants to pull data from a file it doesn’t work because I don’t know where to put it. I get the error
<h2>HTTP ERROR 404</h2>
<p>Problem accessing /irisdataorig.csv. Reason:
<pre>    Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>

So the question is, where do I put my data file, and what string goes into the html so that it can be loaded by the html string in zeppelin?

Thanks

Dean



Re: Path where server can be found

Posted by Corneau Damien <co...@gmail.com>.
If you use the path /irisdataorig.csv in your html file, then the path is
relative to the web server (file is expected to be reachable by anybody so
on the webserver.

So you have a few ways:
1) The csv file is hosted somewhere so public access (
http://mydomain.com/myfile.csv)
2) The csv file is in the zeppelin-web webserver folder (copied through
shell interpreter for example)
3) The csv content is injected in the HTML somehow, for example:
println(s”””%html”””+
file1 + datacsv + file2)
(you can look at this example that is doing something similar:
https://beta.zeppelinhub.com/#/notebook/dcorneau/2AW72S1F8

On Tue, Aug 4, 2015 at 9:10 PM, Wood, Dean Jr (GE Oil & Gas) <
Dean1.Wood@ge.com> wrote:

> I have a html chart that I want to present in zeppelin. I do this by using
> println(s”””%html”””+text) where text is a html file that has been put into
> a string using java.io. This works when the data can be put in a string
> in the html string in the text variable. However, when the html file wants
> to pull data from a file it doesn’t work because I don’t know where to put
> it. I get the error
> <h2>HTTP ERROR 404</h2>
> <p>Problem accessing /irisdataorig.csv. Reason:
> <pre>    Not Found</pre></p><hr /><i><small>Powered by
> Jetty://</small></i><br/>
>
> So the question is, where do I put my data file, and what string goes into
> the html so that it can be loaded by the html string in zeppelin?
>
> Thanks
>
> Dean
>
>