Relative Path Problem

Simple problem, i have a file named gallery.swf in
/site/gallery/ and when i launch the file swf from that directory
the loading is going fine, im loading a xml file with this command
"xmlReadGalleries.load("photo_galleries.xml")" so the file is
loading from /site/gallery/photo_gallery.xml, no problem there.
But, when i run the master.swf from /site/ and then load the
gallery.swf into it, it would not work becuse then it tries to load
the file from /site/photo_gallery.xml and not
/site/gallery/photo_gallery.xml. So here's my question. Why don't
it load from the root directory of the gallery.swf file? And is
there anyway to fix it?
//Mario

Dj Mario wrote:
> Simple problem, i have a file named gallery.swf in
/site/gallery/ and when i
> launch the file swf from that directorty the loading is
going fine, im loading
> a xml file with this command
"xmlReadGalleries.load("photo_galleries.xml")" so
> the file is loading from
/site/gallery/photo_gallery.xml, no problem there.
> But, when i run the master.swf from /site/ and then load
the gallery.swf into
> it, it would not work becuse then it tries to load the
file from
> /site/photo_gallery.xml and not
/site/gallery/photo_gallery.xml. So here's my
> question. Why don't it load from the root directory of
the gallery.swf file?
> And is there anyway to fix it?
> //Mario
SWF does not know or remembers its place on server /
directory.
Once html loads it, it seek its files from perspective of
that HTML file.
So if you keep them all in one folder and place it deep into
sub/sub1/sub2
than load it from html in SUB, it will thing it is its
original position
and not sub2. Causing paths mismatch. Normally we do design
the projects
with that in mind from scratch.
In your case the path would be : gallery/photo_gallery.xml
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
Happy New Year
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>

Similar Messages

  • File Include Relative Pathing Problem

    Was developing large jsp app in JRUN, recently switched to Oracle 9i.
    However the includes work differently.
    In 9i it seems that if a jsp page includes a jsp file, that in turn includes a jsp file... the path to the second include must be relative to the first jsp page and NOT the calling page.
    This discourages code reuse!
    Is it a bug or what?
    null

    Yes I have a jsp file and that file has a tag like
    <jsp:include page="/fragments/test.html" flush="true" />
    jsp application is deployed on Weblogic App server,but the test.html is in on Web Server(IIS). I know that according to the JSP specs,it looks for the test.html with respect to the application context and since test.html could not be found,throws servlet exception. But if I try to use this application with Websphere,it works because WAS will try to look for the test.html with respect to the server context.
    Is there a way Weblogic could work the way as WAS?
    Thanks

  • Problem with include and relative path in jsp

    Precompile jsp with wlappc in 9.2, I got the error "The include file was not found" when the jsp use <%@ include file="../includes/dataEntry/code_error.html" %>
              This code used to work with 8.1. I notice that someone has report the same problem with 9.0 and you have patch for it. Is it fix in 9.2 or do I require a patch as well?
              Thanks,
              Khuemy

    When you precompile, can you say "Keepgenerated=TRUE". It might help you track
              down the difference with the URL. You should only get a 404 error when the
              resource is not found at runtime, which is independant of when you compile. The
              difference should be in how the URL is compiled.
              Chris
              ali wrote:
              > I am using WLS 6.0 SP1, when I use relative path in <jsp:forward> in my JSPs
              > it forwards ok if I am using directly JSPs but if I am using pre-compiled
              > JSPs (and have proper servlet-mappings
              > in my web.xml), I get 404 error with the relative-path, if I change it to
              > absolute path with pre-compiled JSPs it forwards ok , then.
              > any ideas why this is so?
              > thanks,
              

  • Problem with jsessionid and relative paths

    I'm having an issue with jsessionid in a J2EE application running on an all Oracle platform (Oracle DB, 9ias, etc.). Most of the time sessions are tracked with cookies, but occasionally the jsessionid appears on the URL (on first login with a new browser window I think?).
    Anyway, sometimes the session id is very large (100 chars +) and includes special characters, specifically a backslash. This is causing problems with relative paths in the page.
    Is this normal behavior or is there a problem with my app server/JVM setup? Has anyone else seen this? Thanks for any advice.

    Hi Stefan,
              The issue was logged as CR238704. You can either contact [email protected] or
              just pass me your email Id and I'll send the patch to you.
              -- Nagesh
              <Stefan Krause> wrote in message news:[email protected]..
              > The problem I have is that the application is very old and at the same
              > time very big (so we're doing the transition step by step) and there are
              > lots of variables (and even methods in JSP pages - no comment) shared
              > between the JSP pages!
              > So for us jsp:include isn't an option...
              >
              > Is there a way to report bugs when you've got only the free development
              > license?

  • Problem defining relative path ofr images in struct tiles

    hi
    I have a jsp pages in which i am setting the layout using tiles . To display an image
    i am using < img src= "./../images/abc.gif" />
    this doesnt seem to work.
    but if i give absolute path like src="C:\myDoc|....\abc.gif" it works.
    As i have to deploy it so i cant give absolute path.
    One solution i found is to use request.getContextPath()
    <img src="<%=request.getContextPath()%>/tutorial/images/abc.gif" works.
    is there any way we can give relative path like ?
    < img src= "./../images/abc.gif" />

    Hi , I have found the solution.
    <c:url value='/javascript/menuscript.js'/>"{code} can be used to avoide the absoulte path . The c:url tag takes default  value as Webcontent . so you need to give only path after the webContent                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Use Relative Path for Photoshop Action?

    I have a Photoshop Action that is programmed to open an existing file located in a specific directory.  The path to this directory is an absolute path, i.e.:
    C:\Program Files\Photoshop Actions\filename.jpg
    As long as the Action can find the file in the specified absolute path, everything works fine.
    My problem is that if someone tries to run this Action on a different computer (like a Mac), the path specified in the action does not exist and the Action will not work.
    The simple solution to this would be to make the action open the file located at a relative path.  This way no matter what computer the action is run on, it will always be able to find the file.
    Unfortunately, I don't think Photoshop Actions allow relative paths.  Does anyone know if using a relative path in an action is possible?
    Failing this, how would I use a Photoshop Script to somehow direct the Action to find the correct location of the file?  Or is there a better solution?

    The idea that I use in the xtools installer and else where is this:
    1) Convert the action file to XML.
    2) Package the XML file and the apps/ActionFileFromXML script with your stuff.
    3) An installer script will do a 'replace' (or whatever) on the XML file so that the paths are converted to whatever is needed.
    4) The new XML is saved and then converted to a .atn file which is then loaded.
    There is an xtools forum at ps-scripts.com that may have some info in addition to the PDF file that comes with the package.
    -X

  • Relative path to file in servlet class file

    Hello,
    I have several classes running as a Tomcat Servlet on my server. However, I have one class that I would like to access a file on the server.
    The problem is, what path do I use? I want to use a relative path as the servlet might be moved and I don't want to recompile each time the servlet is moved. For instance, I placed the file in the servlet directory under webapps in the same level with the WEB-INF directory. However, using "../../text.txt" does not seem to access it.
    What path should I use?
    Thanks in advance.
    Chris

    This is what I have done:
         String FS = System.getProperty("file.separator");
         String ctx = getServletContext( ).getRealPath( "" ) + FS;
         URL url = new URL("file", "", ctx +   "somefile.txt");
         //Create a BufferedReader for reading the inputstream.
         BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));This gets you back to the "root", or one level above WEB-INF. Add the folder name where the file is located. As in      URL url = new URL("file", "", ctx +   "theFolder/somefile.txt");HTH,
    WalkGood

  • Relative paths for images upset by forwarding requests

    Hello World.
              I am using a web app deployed in Weblogic 5.1 with service pack 8.
              I have hit a problem which puzzles me. When I forward a request from
              one JSP to another (say from A to B) the web server seems to take the
              URLs of the images on the served file (B) relative to the path on the
              calling file (A). Here's a detailed explanation...
              Suppose I have a the web app structured as follow
              /oddApp/launch/A.jsp
              /oddApp/B.jsp
              /oddApp/images/tick.gif
              Page A simply stores its request URI and forwards its request to page B
              <jsp:forward page="/B.jsp" />
              Page B displays its requestURI, contextPath and servletPath. It also
              attempts
              to show three images
              <img src="images/tick.gif">
              <img src="../images/tick.gif">
              <img src="/images/tick.gif">
              When I invoke page B directly, the first image is shown, the others are not.
              When I invoke page A, it forwards to B and the second image is shown, the
              others are not.
              In each case the URI, contextPath and servletPath are correctly displayed
              with regard to page B.
              URI = [oddApp/B.jsp]
              contextPath = [oddApp]
              servletPath = [B.jsp]
              The URI in A.jsp is also correct (i.e. /oddApp/launch/A.jsp).
              The search for the images seems to be relative to the original URI (i.e. not
              the URI used to forward), which strikes me as daft. It means that page B
              must be aware of where it is being called from. It is perfectly plausible
              that
              relative paths which suit when called from one location are incorrect when
              called from another.
              I had thought that including the leadling slash (as shown as the third
              image)
              would cause the search relative to the document root (/oddApp/), but this
              appears not to be the case. The search is done relative to the root of the
              server not the web app.
              Adding jsp mappings in the deployment descriptor of the web app does not
              help (I had thought it a long shot anyway).
              Does anyone have any thoughts on this?
              PHiL
              

    i face the same problem (WinNT, WLS6.0): my wep app has a contextRoot " root " which makes it react to the URL: http://host:port/root /: it is this folder which will be used as a basis by the Web server But in the jps I use a relative URL for images: / images/toto.gif : it works very well when I deploy my jsp out of a Web-app by setting a document.root to the weblogic web server.On the other hand, once deployed in a Web-app, images are not found because the default path of the browser is http://host:port, without the context root of the Web-app! In other words, my war has images/*.gif in its root but when /images/toto.gif is resolved in a jsp, as the relative URL is not prefixed by my context-root, the image is not search in the war! actually, if I type http://host:port/root/toto.gif, my image appearsany clues? an alias on the web server? a setting in web.xml/application.xml and their weblogic equivalent files?
              

  • Relative path for files

    hi all,
    I am making a small program that needs to store some of the users preferences in a text file. I want the text file to be in the jar when i am finished and in the same folder as the main class. I am having a problem though with writing to a reading the file in a relative path. when i use "args.txt" it reads to the c:\args.txt and not the folder in which the program runs. Same thing with "\\args.txt" and "/args.txt". Any help? Thanks! :)

    If your file is in the same directory as the program the relative path is simply the file name : "args.txt". Also possible is "./args.txt".
    Keep in mind though that you can't write to a file in a jar, and even reading it is more complicated than with the ordinary I/O classes.
    Look up the getResourceAsStream method in the API (I think it's a method of the ClassLoader class).

  • Relative path for DllPath configurion settings

    I want to put oracle client dlls in project directory and to use relative path to point to unmanaged dlls but in this version of odp.net I cann't .
    Is it possible to add this feature? For now I will copy the DLLs in application output directory.

    The Oracle .NET feature requests are tracked here:
    https://apex.oracle.com/pls/apex/f?p=18357:46:7715104559110119
    Any OTN member can add their own feature request to be voted on by the community. This Oracle .NET feature requests are reviewed periodically by Oracle Development and PM when planning future ODAC releases. On a regular basis, Oracle reviews all the requests and decides which ones to implement.
    If you would like your feature request considered, please add it here. Be as clear and concise in your description so that others, including the developers implementing your feature request, know exactly what you are requesting. Your feature request is straightforward, so I don't see a potential problem.
    Don't be discouraged if your feature doesn't receive a lot of votes. The most popular features are not automatically incorporated into the next future release. We pick and choose features based on their usefulness, popularity, ease of implementation/testing, Microsoft's product direction, and other factors when deciding what features to include.

  • Relative path for servlet property file.

    I have the following java file. When I use the absolute path for the configFile, it works. I would like to know how I could use it as relative path as in installation, the name of the directory could change.
    How do I fix the problem? Thank you.
    ---------------------- LoadProperties.java ----------------
    import java.util.*;
    import java.io.*;
    public class LoadProperties {
    private String driver="";
    private String dbURL="";
    private String login="";
    private String password="";
    static public void main(String[] args) {
    LoadProperties lp = new LoadProperties();
    } // main
    public LoadProperties() {
    //String configFile = "C:/1LMS/web-app/WEB-INF/config/db.properties";
    String configFile = getClass().getResource("config/db.properties").toString(); <--- This line could not find the db.properties file.
    Properties Prop = new Properties();
    try {
    FileInputStream configStream = new FileInputStream(configFile);
    Prop.load(configStream);
    configStream.close();
    } catch(IOException e) {
              System.out.println("Error: Cannot laod configuration file ");
    driver =Prop.getProperty("driver");
         dbURL = Prop.getProperty("dbURL");
         login = Prop.getProperty("login");
    password = Prop.getProperty("password");
    printResult();
    } //Load Property
    private void printResult() {
         System.out.println("Driver = " + driver);
         System.out.println("dbURL = " + dbURL);
         System.out.println("Login = " + login);
    System.out.println("PSWD = " + password);
    } // class

    hi there,
    had the same problem... you need to use following API:
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
    In your case something like that:
    // get the servlet context
    ServletContext context = getServletContext();
    // directory name where the file is located
    String realPath = context.getRealPath("/config");
    // get real path to your file
    String propertyPath = real+"filename.txt";
    hope that helps!!
    minu

  • Relative path for Download directory folder.I created a firefox profile and i wanted to use this profile in multiple machines.I wanted to use a relative path for download directory with respect to the profile folder.I need this on Linux machines

    I have a use case where I need to use different download directories with different firefox profiles.I need to use this profiles in multiple linux machines.
    I need to have a relative path to my download directory with respect to the profile folder.
    Ex: I have a selenium test which opens a website and downloads it to my machine.I want this downloaded file to go into some specific folder relative to this profile folder.How do I do this??

    That is not a practically empty xinitrc - that file only needs one line: exec WM.  Other things are entirely optional, and some of them very useful, but I'd encourage you to stick with the simplest xinitrc that will do what you require.
    Is slim involved?  Probably.  That is the source of many problems.  But to start narrowing this down, I have 3 suggestions:
    1) temporarily (at least) change your inittab to default to runlevel 3 ... actually, is it currently set to 5 or 3? if it is currently 3 that would explain why slim doesn't start.
    2) at a tty in runlevel 3 use "xinit" instead of "startx".  Startx is fine most of the time, but it is essentially just a complex wrapper for xinit.  That complexity can often iadd useful functionality, but it *always* makes troubleshooting more difficult.  So for now just use a vanilla 'xinit'.
    3) remove dbus-launch from your exec line in xinitrc.  This is done by console-kit so it is redundant and potentially problematic.  Further BOTH of these are taken care of by slim, so I'd even suggest getting both a jump start on being ready for slim and simplifying troubleshooting by removing both of them.  Just make that line "exec openbox-session"
    Edit: adding one more:
    4) temporarily switch out openbox-session for openbox.  I suspect the reason feh's setting of the background is getting overridden is due to a script or setting in openbox's autostart settings - many of these are only invoked when "openbox-session" is called, while "openbox" starts *just* the window manager itself.
    Last edited by Trilby (2012-10-03 17:30:36)

  • XML data source and relative path

    Hi,
    I'm developing my reports in a Windows environment and deploying it on a Linux. My problem is, I cannot seem to specify a relative path for my XML datasource. Since, my deployement is in Linux, I cannot have the standard "C:\myreport\def.xml".
    Is there a way to use a relative path? I've tried creating a environment variable but it gives me the following error.
    ERR 63001: Invalid stream in the Data Definition URL file:///%reports/data.xml null
    -John

    I guess you must be missing some "/" in the values youre passing. Remember that it's also case sensitive. Here's what I did in my report
    The data definition has this value :
    file:///&<P_XML_CFG_PATH>ReconReports.xsd
    P_XML_CFG_PATH = //reports/dtd/
    For the Datasource
    file:///&<P_XML_PATH>&<P_XML_DATAFILE>
    And the value would be something like
    P_XML_PATH = /reports/data/xml/
    P_XML_DATAFILE = <actual filename>

  • DW CS5 Missing Related Files Problem

    Hello
    Hoping somebody may be able to help me with a missing related files problem in CS5. I've tried Adobe phone support but they couldn't solve the problem.
    *Some* of my sites (but not all) are not showing all the files related to that page. My pages are typically in .asp vb server model and contain .asp virtual includes (header, nav etc) plus .js and .css linked files
    However DW is only showing the .asp includes as related files and not css or js ones. In design view the CSS is displaying correctly, and all styles appear in the CSS inspector but not showing as a related file in the bar. In CS4 it works fine.
    I've tried deleting the site and recreating it, copying the files to a new folder and setting up a fresh site, creating a new folder and downloading all files from the remote server but no joy. I've also tried refreshing related files. if I click on the filter in the bar it only shows the asp includes and nothing else.
    Any help would be gratefully appreciated, this is a great feature when it works
    Cheers
    MB

    UPDATE:
    Managed to solve this problem, this is a new issue to DW CS5, previous versions do not seem to exhibit this problem
    It occurs when you use site root rather than document relative paths for js/css etc files AND don't have the remote site url (web url) specified in the site setup | local info dialog, or do not have it fully qualified with http://
    ie. ../js/file.js works fine without a remote web url but /js/file.js does not show the related file in the bar unless a remote url is defined.
    Hope that helps anyone else that encounters the same issue!
    MB

  • Open VI reference and paths problem

    Hi,
    in my project I need to have a VI running independently from the calling VI so I use VI Server and "Open VI reference" to run the VI. However this is not without problems. The VI that I run is not in the same folder, as the caller VI and also not on a fixed location on disk, so I use relative paths (something like "..\subfolder\myVi.vi"). This works in the project and .exe but not e.g. in a .llb file where there seems to be no folder structure anymore.
    Actually I'd prefer if this would not use paths on disk at all but if I could somehow create a reference to another VI in my project and it would even work if the VI's location on disk changed (and is updated in the project). I think it is quite confusing that I have to care about physical location of the VI here when I use the project browser for everything else. Is there a way to accomplish this? Or is there even a better way to start a VI that keeps running even after the caller stopped?
    Thanks,
    Tobias

    As far as I've seen, every VI has the path ../Application.exe/currentvi.vi when you are running in a build.  Therefore, to open another VI you have to strip the current vi's path once, and add the other vi. 
    I have written a VI that determines whether or not I'm running from a build, it is attached.  It returns true if you're in a build, and also the current vi's path stripped once giving you ../Application.exe.
    The way I use the VI is pictured below.  I send the stripped path Is Executable returns and the relative path (minus the vi name) into a Select icon which is wired to the boolean Is Executable returns.  Then I add the other VI name to the path.
    Message Edited by elset191 on 04-21-2009 10:43 AM
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect
    Attachments:
    Is executable.vi ‏8 KB
    untitled.JPG ‏7 KB

Maybe you are looking for

  • "do not have sufficient permissions to sync"

    My son has an iPod touch. My other son had a classic iPod for a while and I tried to point both their iPods at a shared library. I think that failed epically, and may be the cause of our later problems. Starting several months ago, #1 son couldn't sy

  • How do I merge my business catalyst account with my Adobe id?

    I am a new user trying to get my new dreamweaver install hooked into my business catalyst environment that a friend set up for me.  When I launch BC, it says that my email is already in use and to associate my BC id with my Adobe id... I cannot find

  • LED Cinema Displays

    I currently have a 17 inch Sylvania (Tan) and I've been saving up for a 30 inch ACD for 12 months now and I manage to put away $3,000, I know that's more then enough to purchase the current 30 inch ACD but my question to you guys is should I wait unt

  • My iPod Touch 4G won't install apps.

    It just hangs on the "waiting" grey boxes part and doesn't go any further. what do I do? I already reset to factory settings once. I'm using OS 4.3.5.

  • IPhone 4 - photo storage space not being freed after deletion

    Hi all, Wondering if anyone could help me with this - I'd be incredibly grateful! I've got an iPhone 4 (32GB) and I ended up taking so many photos and videos that they were taking up over 16gig in total (I have well over 3,000 including lots of video