Results 1 to 3 of 3

Thread: Mutiple context files - ContextLoaderListener

  1. #1

    Default Mutiple context files - ContextLoaderListener

    The applicationContext.xml config file for our wep is getting quite large and has some logical groupings. We are currently using the org.springframework.web.context.ContextLoaderListe ner to configure our application. As far as I can tell you can't have more than one config file using the ContextLoaderListener? I was reading more about the XmlWebApplicationContext and that it had support for multiple config files. Do you have to load the XmlWebApplicationContext using a ContextLoaderServlet in order to have more than one config file?

    Thx,

    Bryan

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    org.springframework.web.context.ContextLoaderListe ner does support multiple XML config files.

    Code:
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
           /WEB-INF/applicationContext1.xml
           /WEB-INF/applicationContext2.xml
           /WEB-INF/applicationContext3.xml
        </param-value>
       </context-param>
    
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
    HTH
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

  3. #3

    Default WORKS!

    Thank you Omar for the quick reply. That works perfect.

Similar Threads

  1. Replies: 2
    Last Post: Jan 20th, 2009, 04:33 AM
  2. IOExceptions with application context files
    By seanoshea in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:02 AM
  3. Replies: 2
    Last Post: Oct 13th, 2005, 02:47 PM
  4. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  5. Replies: 3
    Last Post: Apr 15th, 2005, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •