One way:
U can unpack your zepplin war file, put the images in the unpacked
dir, then repack and re deploy to tomcat. But need to reember to do
that everytime you get a new zeplin binary. good idea if you make it
part of a process and use a script.
First delete folder - /apps/tmp1
Create again so its empty
/mystuff/zeplinUnpack/
Unpack zeplin war to /apps/tmp1 (first cd /apps/tmp1/ ) with command :
jar -xf /apps/Z/zeppelin-web-0.6.1.war
Copy images from /mystuff/myProject/images to zeplin unpacked
cp -r /mystuff/myProject/images to /mystuff/zeplinUnpack/
pack it again
jar cvfM /apps/Z/zeppelin-web-0.6.1.war *
Here /apps/Z/ is where my zepplin install lives (where the bin,
webapps directories are)
I noticed that the dir is /apps/Z/ of the running tomcat process so to
get a local file in java.io.File:
Using scala default interpreter in a notebook:
import java.io.File
val fdef = new File("./")
val f = new File("./webapps/webapp/mySubflder/bus-beku-bird.jpg")
println("Default path : "+ fdef.getCanonicalPath)
println (f.getAbsolutePath + " exists "+ f.exists() + ",
Canonical " + f.getCanonicalPath )
On Fri, Mar 3, 2017 at 11:22 AM, Meethu Mathew <[email protected]> wrote:
> Hi all,
>
> I am trying to display images in the %md interpreter of zeppelin(version
> 0.7.0) notebook using the following code.
> 
>
> But I am facing the following problems:
>
> 1. Not able to give a local path
> 2. I put the file inside the {zeppelin_home}/webapps/webapp and it worked.
> But the files or folders added in this folder which is the
> ZEPPELIN_WAR_TEMPDIR is deleted after a restart.
>
> How can I add images in the mark down interpreter without using other
> webservers?
>
> Regards,
> Meethu Mathew
>
--
Regards
Tushar Kapila