There are two way to declare the configuration file
- You can declare the file with the configuration in the tag <init-param>
<servlet-name>galleryDispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/spring-master-web.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- The second form is creating a file named galleryDispatcher-servlet.xml in WEF-INF/. In this case automatically are going to look for a file "servlet-name"-servlet.xml
<servlet>
<servlet-name>galleryDispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
No hay comentarios:
Publicar un comentario