facebook

Valid deploy location [Closed]

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

    sitomania
    Member

    Hello,
    I am trying to deploy my project under cocoon. I change my project properties and I set my web context root as : /cocoon/project1 instead of /project1. Then I try to deploy it, I select the project ( exploted archive ), and the server ( tomcat 5 ) and I get NOT VALID as “deploy location”.
    It is critical for me use Cocoon. It there someway to fool my eclipse ?
    Please help,
    Jesus

    #197139 Reply

    support-michael
    Keymaster

    The multi-segment context-root restriction you are encountering is due to the fact that MyEclipse exploits the automatic deployment capability of most appservers which does not allow multi-segment context-roots. If you absolutely required a multi-segment context-root then you must resort an appserver specific deployment extension. For Tomcat this implies manual modification of the server.xml or the newer Tomcat5 context-descriptor http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html.

    Explanation:
    The convention used by the appservers is to designate a special directory under which all packaged and exploded archives reside, e.g., <tomcat>/webapps. All contents of this directory are assumed to be J2EE applications (WAR, JAR, EAR) either in packaged or exploded archive form. Since WARs can not directly specify their context-root, the auto-deploy convention of the appservers is to use the name of the WAR archive or exploded WAR directory as the application’s context-root. MyEclipse uses your web project’s context-root as the archive name for both deployment forms. For example if myProject’s context root is /foo then the exploded deployment to Tomcat will mirror myProject to <tomcat_home>/webapps/foo. Here is the crux of the multi-segment context-root restriction. The extra segments in the context-root translate to pushing the root directory of an exploded web project into a subdirectory under appserver’s auto-deployment directory. This violates the deployment convention of the appserver and thus the server will not deploy your app. A similar problem applies to packaged deployment since the multi-segment path can not be converted to the name of archive.

    I hope this is not too confusing. At this time MyEclipse takes a conservative approach to deployment and relies on conventions and standards for 90% coverage of most deployment scenarios. We will evaluate other options over time for even better coverage.

    Sorry for the long note.

    Michael
    MyEclipse Support

    #197145 Reply

    sitomania
    Member

    So, that means that in Tomcat myEclipse can only can deploy under the folder /webapps ? So if I need to process XML pages with a engine like cocoon what can I do ? Is there some way to fool my eclipse and deploy the application under a different directory ?
    Jesus

    #197147 Reply

    support-michael
    Keymaster

    Deployment locations other than <tomcat_home>/webapps require explicit modification of Tomcat’s server.xml file. You can configure the Tomcat server.xml to deploy your project directly from your project’s web-root directory. Doing this gives you the option to use a multi-segment context-root also. If you use this process do not use MyEclipse deployment for this application since it may conflict with your manual configuration, i.e., non-unique context-root exception or other problem.

    Note: if you want to manually override the deployment location please submit this as an enhancement request. I know that development discussed this at length and retracted the functionality due to support concerns since it is so easy to mess up a deployment if you don’t know all the details. Note they will probably not concede to modifying application server specific files since the consequence of dorking such a file is a total server crash and because servers are so different in how and when they can be configured [static vs runtime].

    Michael
    MyEclipse Support

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Valid deploy location [Closed]

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