SpringFramework_3001

Last modified by superadmin on 2018-01-12 20:19

Back to Item Set

<p/>
<!-- START TestItem -->
<p/>
<div class="TestItem">
<div class="TestItemQuestion">3001 Question:\

What is the correct way to override default Spring MVC configuration file name (e.g. billing-servlet.xml) with a custom file name (e.g. springConfig.xml)?

</div>

Select 1 correct answer(s)!

<p/>
<ol class="MTestItemChoices" type='A'>
<li>

Add a specific tag in web.xml:
{code}
<spring-mvc-config>springConfig</spring-mvc-config>
{code}

</li>
<li>

Add a specific tag in web.xml:
{code}
<spring-mvc-config>springConfig.xml</spring-mvc-config>
{code}

</li>
<li>

Customize <tt>DispatcherServlet</tt> configuration in web.xml adding a specific <tt>\<init-param\></tt>:
{code}
<servlet>
  <servlet-name>billing</servlet-name>
  <servlet-class>
    org.springframework.web.servlet.DispatcherServlet
  </servlet-class>
  <load-on-startup>1</load-on-startup>
  <init-param>
    <param-name>namespace</param-name>
    <param-value>springConfig</param-value>
  </init-param>
</servlet>
{code}

</li>
<li>

Customize <tt>DispatcherServlet</tt> configuration in web.xml adding a specific <tt>\<init-param\></tt>:
{code}
<servlet>
  <servlet-name>billing</servlet-name>
  <servlet-class>
    org.springframework.web.servlet.DispatcherServlet
  </servlet-class>
  <load-on-startup>1</load-on-startup>
  <init-param>
    <param-name>configFile</param-name>
    <param-value>springConfig.xml</param-value>
  </init-param>
</servlet>
{code}

</li>
</ol>
<p/>
<div class="TestItemSkill"><!--$skillid>Skill: $skilltitle</div>
<p/>
</div>
<!-- END MTestItem -->
<p/>
<p/>


{{/velocity}}

Tags:
Created by Alina Vasiljeva on 2012-12-29 21:18
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4 - Documentation