- This topic has 4 replies, 2 voices, and was last updated 20 years, 9 months ago by luns4d.
-
AuthorPosts
-
luns4dMemberI’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
Scott AndersonParticipantGary,
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?
luns4dMemberScott,
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.htmlWe 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
Scott AndersonParticipantGary,
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.
luns4dMemberThanks Scott, That does what I need.
-Gary
-
AuthorPosts