-1

I want load a file from the file system in a web server (Jetty). I used eXist-db and this uses Jetty. I changed jetty.xml and inserted resourceBase element into the resource handler, but this change does not work in Windows. But it does work correctly in Linux.

I want to load a file from any path in Windows with iFrame. For example :

<iframe src="c:\newfolder\test.pdf" />
<iframe src="d:\newfolder\test.pdf" />
adamretter
  • 3,885
  • 2
  • 23
  • 43

1 Answers1

0

You would not use absolute file paths e.g. src="c:\newfolder\test.pdf" in a webpage served from a web server such as Jetty.

Instead you should use the URL to the resource on the web server, perhaps something like src="http://localhost:8080/newfolder/test.pdf"

adamretter
  • 3,885
  • 2
  • 23
  • 43
  • If you are using an absolute path then this has no relationship with Jetty or eXist-db. – adamretter Nov 20 '14 at 12:26
  • This is not an eXist-db or Jetty question. However the src attribute of an iframe expects a URI not a file path, you should probably use something like file://c:/newfolder/test.pdf – adamretter Nov 24 '14 at 11:33
  • i can set "resourceBase" in "jetty.xml" etc: http://stackoverflow.com/questions/8308608/serve-files-from-folder-outside-web-application-in-jetty. this not work in windows. – parsa-tak Nov 25 '14 at 05:58