facebook

Q: Resolve filepath diffs between Dev and Prod [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #201764 Reply

    luns4d
    Member

    I’m working with MyEclipse version: 2.6.100 and Tomcat 5.0.16.

    MyEclipse paths include the project name, my Production environments do not.

    How do I overcome this?

    For example, the production home directory is /index.html but from MyEclipse it is /projectname/index.html So linking to the home page from other jsp and html pages changes when I deploy to production environment.

    -Gary

    #201945 Reply

    Scott Anderson
    Participant

    Gary,

    I’d suggest you simply use relative paths in your links. Something like ../index.html, ./stuff.jsp etc. Using absolute paths can really cause problems in a variety of instances. Is there some requirement you have to use absolute paths?

    #202470 Reply

    luns4d
    Member

    Scott,

    I tried to use relative paths but can’t figure out how to do it in this situation. Let me try to explain. Maybe I’m using outdated technics or something…

    On production server (example):
    Home page – /home.html
    FAQ page – /FAQ/index.html
    Project Page – /Projects/proj1/subTopic/index.html

    We use template(s) for look & feel, navigation, to be consistant over pages. So I need a solution that spans pages and directories.

    A relative link of “../home.html” as you mentioned would work for the “FAQ page” but not the “Project Page.” A link of “../../../index.html” would work for the “Project Page” but not the “FAQ page.”

    A relative link of “/home.html” of course wouldn’t work for the development area, but works fine for our production.

    So, is the solution to create a template for each “directory path depth?” (correct term?) …. or what am I missing here?

    -Gary

    #202485 Reply

    Scott Anderson
    Participant

    Gary,

    Well, here are a couple of things you could do:
    1) Create relative path includes for each directory depth (rather nasty)
    2) Stay with full paths and deploy your application as the root application.

    From your production path, that is obviously what is going on with your production server. There are two ways to deploy as the root application. One is to modify the server.xml file, but there’s an easier way. In the MyEclipse-Web project properties if you specify your Web context-root as ‘/ROOT’, your application will be deployed as the default application, which should allow your development paths to be the same as your production ones.

    #202819 Reply

    luns4d
    Member

    Thanks Scott, That does what I need.

    -Gary

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Q: Resolve filepath diffs between Dev and Prod [Closed]

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