Multiple choice technology web technology

Can you have someother.xml file instead of applicationcontext.xml

  1. Yes,always.Spring framework will understand automatically when it will not find applicationcontext.xml

  2. No,never this can happen

  3. Yes,by specifying a <context-param> element named “contextConfigLocation" for the listener class "org.springframework.web.context.ContextLoaderListener"

  4. Yes,if we use it with JSF

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Spring allows custom XML configuration files by specifying the contextConfigLocation context parameter. The ContextLoaderListener loads the specified files instead of the default applicationcontext.xml. Option A is wrong because Spring doesn't automatically find other files. Option B is wrong because it's possible. Option D is irrelevant to Spring.