Search code examples
eclipseeclipse-wtp

Eclipse WTP - specify deploy folder for the project


I'm using Eclipse WTP plugin for my java web project. I am deploying project via Servers view. Now, I'd like to know whether it is possible to specify name of the deploy folder, by default all files are being placed into a folder that has same name as project has. Is this configurable? Can this be done without modifying project name?

For instance: I have project name in Eclipse MyCompanyProject and when it is being deployed, I get folder with binaries and other resources in webapps\MyCompanyProject. But I'd like to have it deployed to webapps\projectA


Solution

  • Okay, file org.eclipse.wst.common.component should be modified in order to achieve that.

    Lines:

    <wb-module deploy-name="projectA">
    ...
    <property name="context-root" value="projectA"/>
    

    This change will be reflected inside server.xml:

    <Context docBase="MyCompanyProject" path="/projectA" reloadable="true"/>
    

    Resolved...