jQuery in Action, 2nd edition*
The moose likes Other Application Frameworks and the fly likes No WebApplicationContext found: no ContextLoaderListener registered? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "No WebApplicationContext found: no ContextLoaderListener registered? " Watch "No WebApplicationContext found: no ContextLoaderListener registered? " New topic
Author

No WebApplicationContext found: no ContextLoaderListener registered?

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
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 ?

Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

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.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No WebApplicationContext found: no ContextLoaderListener registered?
 
Similar Threads
Spring + Struts [1 web app / 2 ApplicationContext]
Dowloading a file from a a struts 2 web application
ContextLoaderListener in web.xml
Spring MVC-How to get WebApplicationContext in Spring without ContextLoaderListener?
javax naming name not found exception jndi in struts2.0