facebook

Is the relative website root configurable for an HTML proj?

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #227514 Reply

    cebarne2
    Member

    In the HTML editor, how does it know what your web-root is? For instance, if I have a URL:

    /images/hello.gif

    The HTML editor’s design and preview windows are unable to find the image. My intent is that ‘/’ is the root of my project. Is there a preference or property somewhere to define that absolute paths (‘/’) reference the project root?

    I cannot use a relative path to the image. Our website uses a custom portal that uses an index.jsp file at the root of the site to locate all the pages. So, when a browser loads a page, even if the page is 100 levels down the site, it still thinks the current directory is the site root.

    For instance, a page is referenced as follows:

    http://etiweb/cde/index.jsp?menu=support&page=support/knownissues.html

    A browser looking at this page, /support/knownissues.html, is using the root, ‘/’, as it’s current directory (because that is where the index.jsp portal resides). If I have a relative link to an image in my knownissues.html page, it will look fine while developing in MyEclipse since MyEclipse HTML editor is not aware of the portal constructs. But, when I place the page on the server:

    relative link:

    (in /support/knownissues.html)
    ../images/hello.gif

    resolves to:

    “/../images/hello.gif” instead of the expected “/support/../images/hello.gif”

    We could definitely use absolute paths to our links and images… but they do not appear in the HTML editor design window (it is not aware of ‘/’ root).

    Is there a solution?

    Thanks,

    Chad Barnes
    Rockwell Collins, Inc.

    What operating system and version are you running?
    XP SP1+
    What Eclipse version and build id are you using? (Help > About Eclipse Platform)
    Version: 3.0.1
    Build id: 200409161125
    – Was Eclipse freshly installed for MyEclipse?
    No.
    – If not, was it upgraded to its current version using the update manager?
    Yes.
    – Are any other external plugins installed?
    Yes.
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    8
    What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
    3.8.4
    What JDK version are you using to run Eclipse? (java -version)
    1.4.2_06
    What JDK version are you using to launch your application server?
    NA
    What steps did you take that resulted in the issue?
    NA
    What application server are you using?
    NA
    Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
    Nope

    #227520 Reply

    Riyad Kalla
    Member

    The HTML editor’s design and preview windows are unable to find the image. My intent is that ‘/’ is the root of my project. Is there a preference or property somewhere to define that absolute paths (‘/’) reference the project root?

    Don’t code for the editor like this, once you deploy this project this path will mean something different, it will be the root of your server path, not of your web app. Also the HTML preview is getting replaced in 4.0 release (late April) with a much better version. Hang in there.

    Chad, based on what you posted above I would say ignore the preview feature for now and code against your portal’s needs. Then when 4.0 comes out we will see what works and what doesn’t and file what isn’t working as an issue and try and get that working for you.

    #274280 Reply

    flefebure
    Member

    Hello, is there some update since 2005 ?

    I am evaluating MyEclipse to work on a huge existing site and on this site all the paths to images are absolute to the server root. And invisible in the preview Panes.

    BR

    #274286 Reply

    Riyad Kalla
    Member

    BR,
    There is no update, this hasn’t been changed in the designer.

    Just to be clear, all the image paths in the site are in the style:
    src=”/images/blah.gif”

    ?

    #274299 Reply

    flefebure
    Member

    Not All but many (several 1000)
    In my opinion, this is a lack of your product which can’t preview in a multi-context environment
    Got to continue my quest for a dream visual html editor for eclipse 🙁
    BR

    #274317 Reply

    Riyad Kalla
    Member

    Got to continue my quest for a dream visual html editor for eclipse 🙁

    Or just update the href references and make them relative using find/replace? (Is that an option?)

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Is the relative website root configurable for an HTML proj?

You must be logged in to post in the forum log in