For some reason my Eclipse sometimes changes the context root of my web application in the weblogic.xml file to the name of the project. The name of the project is different from the context root. How do I prevent this?
Asked
Active
Viewed 1,800 times
3
-
See this similar question: http://stackoverflow.com/questions/16617595/weblogic-application-context-root-is-war-file-name-instead-of-name-specified-in And the example here: http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Create_J2EE_application about setting the `deployment descriptor` – Display Name is missing Sep 11 '14 at 18:30
2 Answers
3
Add following property to your pom.xml:
<properties>
<m2eclipse.wtp.contextRoot>my-context</m2eclipse.wtp.contextRoot>
</properties>

Gilliard Macedo
- 386
- 1
- 6
0
In your workspace, find the following file:
{workspace}\{project name}\.settings\org.eclipse.wst.common.component
Then edit it with the following:
<property name="context-root" value="your context root"/>

Jules Dupont
- 7,259
- 7
- 39
- 39