I would like to know while instantiating beanfactory why we use only classpathxmlapplicationcontext not other ones. What we use for ApplicationContext. What are the differences, similarities, uses of these two. Any ideas, suggestions, sample code, resources, links highly appreciated. Thanks in advance
You've been asking a lot of basic questions, which is not wrong, but I'd like to suggest you to take a book if possible. If not read the online documentation. This will help you grab the basics.
The ClassPathXmlApplicationContext (remember that Java is case-sensitive) is used to access an application context file which lies in the classpath. It is an implementation of the ApplicationContext. There are others, but this may be the most used.