Loading
Spring DispatcherServlet Example

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  How to declare DispatcherServlet in Web.xml


  • Spring DispatcherServlet set up
    Sample Img 27

Ans)

The DispatcherServlet :
The DispatcherServlet is a central servlet that dispatches requests
to controllers, this plays the “Front Controller” role in Spring MVC. 

<web-app>

    <servlet>
        <servlet-name>example</servlet-name>
        <servlet-class>
  org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>example</servlet-name>
        <url-pattern>*.form</url-pattern>
    </servlet-mapping>

</web-app>



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Spring DispatcherServlet Example


Spring DispatcherServlet Example

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free