Reputation: 2917
I have a maven project for my java enterprise application that is deployed on a JBoss 7.1 server.
In my EAR module I have this pom.xml
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<finalName>myproject</finalName>
<modules>
<webModule>
<groupId>myproject</groupId>
<artifactId>myproject-webservice</artifactId>
<contextRoot>/</contextRoot>
<unpack>false</unpack>
</webModule>
<ejbModule>
<groupId>myproject</groupId>
<artifactId>myproject-ejb</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
I would like to set the root context to /
so I can go to http://127.0.0.1:8080
. But JBoss won´t deploy if the root context is /
saying:
08:00:54,251 INFO [org.jboss.as.controller] (management-handler-thread - 36) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: Failed to start service
But if the root context is something else than /
, like <contextRoot>/myproject</contextRoot>
, it works (but then I have to go to http://127.0.0.1:8080/myproject
).
What is wrong with my configuration?
Upvotes: 0
Views: 2933
Reputation: 2917
I found the answer here: https://community.jboss.org/thread/198890
It stands:
AS7 comes with a default application deployed to /
context. When you hit localhost:8080, you'll be shown a page which has a message which says:
To replace this page set "enable-welcome-root" to false in your server configuration and deploy your own war with / as its context path.
I just changed the standalone.xml and that was the solution! :-D
Upvotes: 2