facebook

How handle URL – URI reference difference from Dev to Prod

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #201672 Reply

    luns4d
    Member

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

    Using MyEclipse, projects are deployed to a path of ….[project name]/webpages.

    This causes a jsp and html page referencing issue for me when the files are moved to the production environment. How do I resolve this, any hints on procedure to follow?

    For example, converting from existing projects, a href link of “/general/samplePage.jsp” has to be converted to “/projectName/general/samplePage.jsp” for MyEclipse, but then this doesn’t work in Production.

    -Gary

    #210683 Reply

    Riyad Kalla
    Member

    Gary,
    You shouldn’t be using the “/projectName/etc” path to locate JSP files during development, you should make use of servlet context information for determining the base path fo the page while its running, and avoid absolute paths when possible (e.g. don’t put a / at the front of the url unless you know the name of the running webapp and can prepend it after the slash).

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How handle URL – URI reference difference from Dev to Prod

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