Header

  1. View current page

    정상혁의 수첩

Profile_img_60x60_08
195

Spring web.xml

Listener 설정

<context-param>

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

   <param-value>classpath:applicationContext.xml</param-value>

</context-param>

<listener>

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

</listener>

 

WebApplicationContextUtils.getWebApplicationContext(getServlerContext());

 

DispatcherServlet 설정

web.xml에 설정

    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>
            org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <init-param>
               <param-name>contextConfigLocation</param-name>
               <param-value>classpath:applicationContext.xml</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>

History

Last edited on 01/15/2009 13:54 by benelog

Comments (0)

You must log in to leave a comment. Please sign in.