 <p><strong>What is the purpose of the second tag, <code>&lt;context:component-scan&gt;</code>?</strong> Well, you need a bit of background information to understand the purpose of this tag. Basically,say the <code>@Controller</code> annotation indicates that a particular class located at <code>base-package="yyy.xxx"</code> serves the role of a <strong>controller</strong>. Another example the <code>@RequestMapping</code> annotated methods to serve a web request. So, <code>component-scan base-package="yyy.xxx"</code> will tell the spring container via the dispatcher servlet to locate such annotated classes and methods for mapping. <em>But, There are plenty of more detailed explanation if you google it.</em> </p>