2

Problem: I have two contextConfigLocation parameters, one with @Configuration classes for spring-social-facebook and one with xml-file for app:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>com.communicator.core.social.facebook.config</param-value>
</context-param>

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/root-context.xml</param-value>
</context-param>

Both of them use one param-name, and I don't know how to fix it.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
uncle Lem
  • 4,954
  • 8
  • 33
  • 53

4 Answers4

4

You will be try this

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/root-context.xml,
        com.communicator.core.social.facebook.config
    </param-value>
</context-param>
ggarridov
  • 87
  • 1
  • 9
1

You can use white space to separate each parameter within <param-value> like this.

<context-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>/WEB-INF/resources/spring/*.xml /WEB-INF/resources/module/*.xml /WEB-INF/resources/function/*.xml /WEB-INF/resources/bean/*.xml</param-value>
</context-param>
matthung
  • 35
  • 1
  • 40
1

After test all answers, none works for me. I found the solution in this post JSF2 how to specify more than one custom element library in web.xml file

<param-value>com.communicator.core.social.facebook.config;/WEB-INF/root-context.xml</param-value>
Javier
  • 111
  • 5
0

Servlet spec says that you can have only one value for any context parameter. So, you are left with going with delimited list only.

<context-param>
  <param-name>Hosts</param-name>
  <param-value>ex1.com,ex2.com,.....</param-value>
</context-param>
Alaeddine
  • 1,571
  • 2
  • 22
  • 46