I am novice to spring and I am getting the error at server start up whenever I try to start tomcat .
No WebApplicationContext found: no ContextLoaderListener registered? Can anybody please tell me the reason for the same . The code which I am trying to invoke is as follows
When I google for the same , I got the information to put an entry in web.xml as follows
Even after making this entry its failing. What is the purpose of this entry in web.xml. why one should make this entry ? Is there anything else required apart from this entry in weblxml ? I suspect it also requirs the contextConfigLocation as context parameter ? What should be its value if at all its required ?
That entry in the web.xml is used to start up the Spring applicationContext when the web app is started.
What application server/version are you using? ContextLoaderListener works with app servers that follow the Servlet 2.4 spec, and some that follow the Servlet 2.3 spec - otherwise you have to use a servlet that is configured to load on startup before any others - in this case you would use Spring's ContextLoaderServlet class. The JavaDoc for ContextLoaderServlet lists specific application servers and versions.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
subject: No WebApplicationContext found: no ContextLoaderListener registered?