web,go,relative-path,static-files
Im using go's net/http library to serve up a web app. When users come to the site, they can simply go to /, and it serves index.html (like any site). This is implemented using: r.PathPrefix("/").Handler(http.FileServer(http.Dir("./"))) However, there are two ways to structure such an app. First you could pack all...

java,spring,relative-path,spring-tool-suite
I am developing a Spring application using the Spring tool suite. My basic aim to read an existing xml file and do some stuff with it. The problem I am facing is that I am not able to use relative file path while running my code on server (tomcat 8.0.18)....

java,relative-path
This question already has an answer here: How to read text file from relative path in a project? 6 answers I have written some code that relies on another project that I have included in my build path. The issue I am having is that the other project has...

image,pdf,xslt,relative-path,xsl-fo
I am trying to create a pdf using xsl-fo where the background image is being used. I have set up the relative path as follows:- background-image = "url('../themes/images/logo.gif')" When I give absolute path like background-image="C://Images/logo.gif", it worked. but when I use url to take it relatively in the server, it...

asp.net,iis,authorization,relative-path,restriction
I'm trying to restrict anonymous users from browsing directly to a particular filename (image file) in a folder on my website. But when I turn on the "IIS Authentication" feature on the folder, both anonymous users and the website application can't access the image file. How can I deny access...

c#,xml,wpf,visual-studio,relative-path
I'm trying to load a file with pack://application: The file is situated in the root of my project but I keep getting a null reference error. However When I do an absolute reference it finds the file and loads just fine. What am I missing here? This doesn't work var...

php,include,relative-path
I'm building out a very small page that will live for the duration of a 5 day conference. Each day the site needs to load new content so I'm using a small script to load in an include file. I'm trying to get my includes to be relative paths but...

c#,wpf,bitmap,relative-path
I am trying to create a Bitmap using: bitmap = new Bitmap(@"Movies\View\Images\missing_person.bmp"); However, I am receiving a System.ArgumentException error. The file I'm calling the above code from is located in: MyProj\DisplaySideBarCommand.cs The images are in: MyProj\Movies\View\Images\missing_person.bmp I also tried using: bitmap = new Bitmap(@"..\Movies\View\Images\missing_person.bmp"); but received the same error....

powershell,relative-path
I have a folder named source. It's structure is like the following. source\a.jpg source\b.jpg source\c.xml source\d.ps1 source\subdir1\a.xml source\subdir2\b.png source\subdir3\subsubdir1\nothing.img I want to list all the relative paths of folders, sub-folders and files in a text file say, out.txt. For above the output I expect is: source\a.jpg source\b.jpg source\c.xml source\d.ps1 source\subdir1\a.xml...

windows,batch-file,cmd,relative-path
My batch scripts are located in the following directory: \\test\public\windows\scripts\32\test.bat I'm trying to get the path of this folder: \test\public\windows\logs I've tried using %~dp0 in order to get the path of the script, and i've tried: SET REL_PATH=..\..\ The thing is that it's not showing me this folder....

visual-studio,relative-path
I have two projects in my solution: Echipieri.Data (database repository) -> Locations.txt Echipieri.Web (ASP.NET MVC) I want to read the locations file from Data but I can't figure out the relative path. I tryed: string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Locations.txt"); But it searches in Echipieri.Web not Echipieri.Data. How do I get...

java,path,processing,relative-path,absolute-path
I am fairly new to processing (and programming in general). In a project that I'm doing I need to access the following path: f = new File("C:/Users/Matthew/ColourFeature/data/image1.jpg"); This, being an absolute path, works without any problem. However since this program will be run on different machines I am trying to...

angularjs,relative-path,angularjs-routing
I have a website that will likely be placed within a directory in IIS. When I am running the application on my computer through IISExpress, the routes are relative to the base URL, so I can just define my routes as follows: $routeProvider.when("/home", { controller: "homeController", templateUrl: "/app/layout/myView.html" }); This...

java,text,relative-path
I have a program that reads numbers from a .txt file. My problem is where to place this file, or how to reference it with a relative path to make this file accessible without using the absolute path.

php,path,relative-path,realpath,pathinfo
I've searched ways to do it so it would work but none of them seemed to work for all paths, so I was wondering if you could give me a direction on how to do this: This is the structure: Home Directoy config.php index.php includes/ user_login.php applicant_track.php ucp/ index.php When...

jdbc,h2,relative-path,persistent,playframework-2.4
We're developing a Play 2.4 application (Java API). For dev purposes, we'd like to use a persistent H2 database with DB file path relative to the project root directory. In How to use a persistent H2 database in the Play Framework instead of in-memory there was solution for Play 2.0:...

powershell,cmd,relative-path
I have a folder named source. It has some jpeg files and some subdirectories containing further jpeg files. I want to copy relative paths of all the files and other files in subdirectories in a text document "test.txt". For example, I have files, a.jpg b.jpg c.jpg and subdirectories sub1/d.jpg sub2/e.jpg...

asp.net,image,iis,relative-path
I've a problem when I try to display a photo using the asp:image tag. I work on Visual Studio 2008, it displays the photo in VS but not on the IIS. If I put my path in the network, it works. I try with absolute, relative and virtual path. Of...

git,path,relative-path,git-status
I wish to use the output from git status in a script but, because the output is always giving repo-relative file paths, other commands can't find their args. This question mentioned the relativePaths option but it has no effect on output when given as a command option: git -c status.relativePaths=true...

jquery,api,relative-path
Hi currently I am working on a jQuery plugin in which I make an API call. Rather than hard coding the URL for the API, I would like it to be relative in terms of the URL of the JS file of the plugin So say I have the following...

javascript,relative-path
I am facing difficulty in understanding relative path concept, I have seen a part of code written as ../../abc/file/images/picutre/down.gif how the relative path is computed...

c,path,relative-path,absolute-path
Given two absolute paths, e.g. /a/path/to/a /a/path/to/somewhere/else How can I get a relative path from one to the other, ../a? In a sense, the opposite of what realpath does....

java,unix,relative-path,launchd
I'm using File.getAbsoluteFile() in order to build a relative path to the resources folder. While I'm executing the code within IDE - works great. I've compiled a jar file, and executing it trough script within terminal - works great. In both cases I'm getting correct relative path : "/Users/ie54553/Desktop/MyProject/" I've...

css,gruntjs,relative-path,grunt-contrib-cssmin
I am using grunt-contrib-cssmin, for the minification of my css files. I want the relative urls in the css files to be replaced automatically in my target minified file. I have looked for this problem and found the two options that I can use to replace the url, target, root...

java,eclipse,tomcat,path,relative-path
I have a configuration project that few projects are using it. All of my project under the same workingspace. workingspace/configuration workingspace/webapp1 workingspace/mongoDB workingspace/model mongoDB and the model project are using the configuration jar project and able to read the xml files using relative path ../configuration/conf/....xml when using the System.out.println("Working Directory...

c#,path,windows-ce,c#-2.0,relative-path
I'm using Windows CE 6.0. I'm developping an application that needs to read a XML file (bar.xml) that is placed right next to my executable (foo.exe). I try to access it with the following method, called right after my Main() : private void ParseXmlFile(string _sFileName) { XmlDocument l_doc = new...

osx,hyperlink,applescript,relative-path,finder
This is the background: in my company, we use Google Drive and often have to tell each other the path to a particular file. Paths are long as we use a lot of nested folders, so it's pretty boring and time consuming to browse through all that. Now, in my...

php,ftp,relative-path,filepath,realpath
I have a class that handles FTP stuff located here: /var/www/html/crm/rhinos/classes/ftp.php This class is included in a script that generates a spreadsheet here: /var/www/html/crm/send_cust_lock.php The generated spreadsheet is located here: /var/www/html/crm/tmp/cust_lock_1430424215.xlsx My class contains the following method: public function put($filepath){ $fp = fopen($filepath, 'r'); $z = ftp_fput($this->connection, $filepath, $fp, FTP_BINARY);...

c++,file,relative-path,fstream
I try to load a file with fstream. The code looks like this file.open("../levels/level0.lvl"); if (file.is_open()) { while (!file.eof()) { std::getline(file, Str); list = ReadLine(Str, list); } } But it loads nothing. Yes only if the path is absolute. How can I make the path relative? The folder "levels" is...

javascript,css,.htaccess,nginx,relative-path
I had an apache webserver where I justed a htaccess. I switched to NGINX and I did the NGINX configuration. My rewrite is as followed: location /mvc/public { index index.php; try_files $uri $uri/ @rewrite; } location @rewrite{ rewrite ^/mvc/public/(.*)$ /mvc/public/index.php?url=$1; } This works properly but now the other files I...

java,relative-path
I want to use this kind of "relative" path, because I want to be able to include all the files in this directory as part of a github project that others can download and just run. So I want to just jump up once in the structure ../ and then...