Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
How to Configure Spring in web.xml file ?
1 Answer(s)      2 years and 11 months ago
Posted in : Spring


How to Configure Spring in web.xml file ?


Advertisement
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 Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com