File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes DispatcherServlet Initilization stage. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "DispatcherServlet Initilization stage." Watch "DispatcherServlet Initilization stage." New topic

DispatcherServlet Initilization stage.

Joy Vergis
Ranch Hand

Joined: Sep 14, 2009
Posts: 48
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

Joined: Mar 07, 2010
Posts: 1682

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.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: DispatcherServlet Initilization stage.
jQuery in Action, 3rd edition