Friday, December 7, 2012

How to define Context-root for a webapp in Eclipse


To define the context-root for a webapp when deplopyed to server on eclipse, specify it by Project -> Properties -> WebProject Settings.

The properties is saved under .settings/org.eclipse.wst.common.component
<property name="context-root" value="test-package.rest-services"/>

When deployed to server, server.xml will contain

<Host ....>
            <Context docBase="test-package.rest-services" path="/test-package.rest-services" ..../>

</Host>


No comments:

Post a Comment