Results 1 to 2 of 2

Thread: web application, configuration files location

  1. #1
    Join Date
    Jul 2011
    Posts
    1

    Default web application, configuration files location

    Hi; i find quite difficult to find the precise way the configuration file is searched at container startup.
    I collect some information that states that the container:
    1) searches for a file that has the same name of the class, but what is the actual class name (CoC)?
    2) looks for a contextParam with name=contextConfigLocation

    Is it right? Do you have more info on point 1?

    thanks

  2. #2
    Join Date
    Jul 2010
    Location
    Venice, Italy
    Posts
    709

    Default

    If you don't specify contextConfigLocation in web.xml, the listener by default (convention over configuration) will try to bootstrap the application context from a file named applicationContext.xml located directly under the /WEB-INF folder. By specifying the parameter, you choose not to use convention over configuration and can specify a different filename and/or location (you should still choose a place under WEB-INF or a subdirectory, so that your Spring configuration files are not accessible by the client).

Posting Permissions

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