Home Answers Viewqa Spring How to Configure Spring in web.xml file ?

 
 


samar
How to Configure Spring in web.xml file ?
1 Answer(s)      a year and 7 months ago
Posted in : Spring

How to Configure Spring in web.xml file ?

View Answers

October 10, 2011 at 3:20 PM


Hi you need to map the DispatcherServlet in web.xml as

    <servlet>
        <servlet-name>dispatcherServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>*.htm</url-pattern>        
    </servlet-mapping>

Note;- The DispatcherServlet file name should be dispatcherServlet-servlet.xml if you write dispatcher then Dispatcher Servlet xml file name would be

dispatcher-servlet.xml









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.