relative-path

Relative path for the Subreport

Hi, I'm working with iReport 3.5.0, and I'm using a subreport inside my main report. I don't want to give the absolute path for the subreport expression, but for example if I just give "bpSubReport.jasper" as the subreport expression (because sub and main are in the same directory), then iReport can find bpSubReport.jasper and compile th...

Relative paths not working when I put WAMP in "Put Online" mode

I have installed the WAMP server on my local machine, and would like to use it in "Put Online" mode to share the work with clients. I have it working with the IP address, but when I click on a PHP file in the localhost, the basic HTML displays, but the CSS doesn't seem to work. The CSS is connected through a relative path, but it won't...

In a Sql Bulk Insert statement, can we use relative path(files\a.txt) instead of absolute path(c:\abc\a.txt) or networked universal path (\\abc\a.txt)

I wanted to insert data in a table from a text file where it is stored in csv format to a sql server table. For that, I am using bulk-insert statement. Now I need to specify the file name in "From" clause. I don't want to use networked locations or local locations over there. I want to upload my text file in the same directory as my exec...

ASP MVC Friendly URL's and Relative Path Images

I have an ASP.NET MVC page, where I am trying to show friendly URL's. So, I have a Category View in the Home Controller, that accepts a categoryKey value to get the content of the page. For instance: http://localhost/Home/Category/Bikes gets the bike content. in my Global.asax.cs, i have the following to handle this: public static vo...

How to use Server.MapPath to get location outside website folder in ASP.NET

When my ASP.NET site uses documents (e.g. XML), I normally load the document as follows: Server.MapPath("~\Documents\MyDocument.xml") However, I would like to move the Documents folder out of the website folder so that it is now a sibling of the website folder. This will make maintaining the documents considerably easier. However, re...

MSBuild clean directory string

I have a property in MSBuild to represent the directory above the MSBuildProjectDirectory: <PropertyGroup> <BuildDir>$(MSBuildProjectDirectory)\..</PRSBuildDir> </PropertyGroup> I need to then use this property, but I need the directory string cleaned so that it doesn't include the ... In other words I need the .. evaluated, so t...

Get relative path to XML file from a non-servlet class in a WAR

Hello, I have an XML file which I need to read and load the data in memory every time the app launches. So, while the project was in Eclipse, i hardcoded the path: "/path/to/xml" but when I create the WAR, how can I specify the relative path to the XML file. I can do it using URL url = getServletContext().getResource(fileName); But, I...

Using Bash to automate creation of test outputs.

I have a java program that I am trying to generate 3 outputs for, and then rename them depending on what the input file was originally called. The problem is that only the input file is being moved. I think this might be an issue regarding relative file commands. Here is my script. (Also, I'm open to suggestions on making this script b...

Program uses Microsoft Visual Studio folder instead of relative path

When I try to run .aspx page with next code: System.IO.File.Delete("~/img/afisha/" + fileName); it writes a message: "Could not find a part of the path 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\~\img\afisha\brs_01.jpg'." But I need to use relative path. ps. the same shit is with the connection string: <add name="acces...

PHP - Apache server config DocumentRoot

Recently on my web server I changed the index.php page to 301 to / for SEO purposes. Now that I'm offline and using XAMPP, the document root is set to http://localhost/xampp/ and trying to login is sending the form to / which is the xampp folder rather than that specific app's folder. I have many different folders for all the different ...

Relative path from a JS file that lives on a different domain

I have an html file that lives on www.domain-a.com It references a js file that lives on www.domain-b.com/somedirectory/js Within the js file I need to be able to point to www.domain-b.com but using relative paths only to a file such as www.domain-b.com/somedirectory/images Any advice? Currently I am trying something like... myImgUrl...

PHP include chain not working

Here's the folder structure of my project: /ping --/Controller ----Ping_Conntroller_Main.php ----Ping_Conntroller_Db.php --/Model ----dbCredentials.php --/View ----output.html.php 'ping' is the folder that contains my project and it sits inside the 'xampp/htdocs/' directory on my computer (C:/xampplite/htdocs/) Here is the initia...

Application-Relative URLs

I've just create a new ASP.NET Web Application in VS2010, and set it up as an application in IIS7. Not sure if this is relevant, but the code physically resides in the \myserver\projects\epeui\epe folder (the projects folder is the root of my default web site). The application hangs off the root of this machine's default web site: http:...

Templating and trying to reference context path from inside a CSS file

I'm working with JSF and XHTML templates, I'm using a CSS file in the templates, the background images being called like: background-image: url("../../images/imageFile.jpg"); Because I'm using templates I found out that I must keep same depth for both pages and styles/images to pages apply styles correctly, but the project had change...

Mogenerator: using a relative path for output-dir from within Xcode

I'm trying to customize the default parameters of Mogenerator. Specifically, I want to customize the --output-dir parameter. It works if I use an absolute path, but I want to use a relative path instead. What's the working directory when Mogenerator is invoked automatically when the .xcdatamodel file is saved? I'm hoping it's some dire...

Absolute to relative path (Eclipse, JSP)

I am making a web application in Eclipse (JSP) and use Tomcat as a server (integrated into Eclipse). I have to create the object below and specify the path to configuration file. This absolute path is working great: Store store = StoreFactory.create("file:///C:/Users/Aliens/workspace/myProject/WebContent/config/sdb.ttl"); However I am w...

How to check if directory exists at particular path programmatically in Objective-C?

Hello, Please tell me how to Get the current working directory's absolute path If this is the absolute path /Users/iphone/Documents/Archive how to convert this path to relative path? How to check if directory exists at patricular path programmatically in Objective-C and if it doesn't exist how to create it programmatically? i need t...

Relative path in .net

I am running my c# application from "D:\App\program.cs" my application needs to execute a file placed in "c:\program files\software\abc.exe" How can i set relative path in my program to execute the "abc.exe" ? ...

In Ant, how can I import a properties file relative to the declaring build file

Hi all, I have my main build.xml which imports a common-build.xml from a shared directory. The common-build.xml imports a build.properties which is located in the same directory. At the moment I have to use a common.dir property which is set by the calling build.xml. If I just do <property file="build.properties"/> Then it load...

django url path problem

I feel like there is a easy answer to this but I don't know it. I have a app that uses base template with a html link to the user's home page '../home/', but once you get 2 levels into the site, that link can't get back to the home page level. For example, the user logs in and goes to www.yadda.com/home. When a user selects a book (...