관리 메뉴

코드를 남기고 다시 한번 기록하는 블로그.. 해커정신과 개발의 도가 숨쉬는 공간이 되기를 바란다!

web.xml 스프링3입문 본문

FrameWork/Spring

web.xml 스프링3입문

아둔한사 2014.08.05 18:34

 <!-- 01. Config about Put which DI Container in Web Container -->

  <!--  I think this is for applicationContext.xml -->

  <context-param>

  <param-name>contextConfigLocation</param-name>

  <param-value>

  classpath:/META-INF/spring/beans-biz.xml

  </param-value>

  </context-param>

  

<!-- 02. Write DI container in  Web Container -->

<listener>

<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

</listener>

<!-- 03.  DispatcherServlet -->

<servlet>

<servlet-name>dispatcherServlet</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<init-param>

<param-name>contextConfigLocation</param-name>

<param-value>classpath:/META-INF/spring/beans-webmvc.xml</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>


<!-- 04. DispatcherServlet Path Config  -->

<servlet-mapping>

<servlet-name>dispatcherServlet</servlet-name>

<url-pattern>/</url-pattern>

</servlet-mapping>

<!-- 05. Just Reading -->

<context-param>

<param-name>defaultHtmlEscape</param-name>

<param-value>true</param-value>

</context-param>

<!-- 06. Encoding Config -->

<filter>

<filter-name>encodingFilter</filter-name>

<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>

<init-param>

<param-name>encoding</param-name>

<param-value>UTF-8</param-value>

</init-param>

</filter>


<filter-mapping>

<filter-name>encodingFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

0 Comments
댓글쓰기 폼