This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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.