• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DispatcherServlet Initilization stage.

 
Joy Vergis
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm reading a tutorial for spring2.0 web mvc framework. Please help me to understand the below:


While initializing the DispatcherServlet it creates WebApplicationContext implementation class instance, either user configured custom class o the default XmlWebApplicationContext. The WebApplicationContext is responsible to locate the Spring Beans XML configuration file,then read,validate the configurations and details into configuration objects.


 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a horrible tutorial. Why are you looking at Spring 2.0? Unless there is a good reason, try to focus on the newest Spring which is currently at 3.1.

If you want to know more about how Spring works the reference documentation is always the best place to start. If I can't find my answers there, well it is open source

Each DispatcherServlet has its own WebApplicationContext, which inherits all the beans already defined in the root WebApplicationContext. These inherited beans can be overridden in the servlet-specific scope, and you can define new scope-specific beans local to a given Servlet instance.
Upon initialization of a DispatcherServlet, Spring MVC looks for a file named [servlet-name]-servlet.xml in the WEB-INF directory of your web application and creates the beans defined there, overriding the definitions of any beans defined with the same name in the global scope.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic