Deploy 2 spring .war with different context on JBOSS 7 AS

Assume you have 2 applications
SpringApp1.war
SpringApp2.war

when you try to deploy both on JBOSS 7 AS,

 you will may see some error like this:

Exception sending context initialized event to listener 
instance of class org.springframework.web.util.Log4jConfigListener 
java.lang.IllegalStateException: Web app root system property already set to 
a different value: 'webapp.root' = [E:\jboss-as-7.1.1.Final\standalone\deployments\SpringApp1.war] instead of [E:\jboss-as-7.1.1.Final\standalone\deployments\SpringApp2.war] 
- Choose unique values for the 'webAppRootKey' 
context-param in your web.xml 
ensure you add the below context param in web.xml of both the .war files:

Comments

Popular posts from this blog

defining functions clojure

Integrating Struts2 with Spring Security using Custom Login Form