• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

No WebApplicationContext found: no ContextLoaderListener registered?

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,
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 ?

 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic