title: java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered
body: <p>I have only one application context file tradelc-servlet.xml. So I think ContextLoaderListener is not needed. But still I am getting the exception mentioned in the title</p>
  
  <p>ClsEditBody.jsp</p>
  
  <pre><code>    &lt;%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%&gt;
  &lt;%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%&gt;
  &lt;%@ taglib prefix="logic" uri="http://java.sun.com/jsp/jstl/core" %&gt;
  &lt;%@ taglib uri="/WEB-INF/tlc.tld" prefix="tlc" %&gt;
  &lt;%@ taglib uri="/WEB-INF/c.tld" prefix="c" %&gt;
  
  
  &lt;%
      String titleKey="crp.cls.title." + request.getParameter("action");
  %&gt;
  &lt;c:set var="action"&gt;
           &lt;%= (String)request.getParameter("action")  %&gt;
  &lt;/c:set&gt;
  
  
  &lt;tlc:in parameter="action" value="modify;create"&gt;
      &lt;form:form&gt;
      &lt;form:hidden path="ukey" /&gt;
  .
  .
  .
  .
  </code></pre>
  
  <p>web.xml</p>
  
  
  
  <p></p>
  
  <p></p>
  
  <pre><code>   &lt;!--CharsetFilter start--&gt; 
  
        &lt;filter&gt;
          &lt;filter-name&gt;Charset Filter&lt;/filter-name&gt;
          &lt;filter-class&gt;com.bankofny.inx.omx.lc.web.action.CharsetFilter&lt;/filter-class&gt;
            &lt;init-param&gt;
              &lt;param-name&gt;characterEncoding&lt;/param-name&gt;
              &lt;param-value&gt;UTF-8&lt;/param-value&gt;
            &lt;/init-param&gt;
        &lt;/filter&gt;
  
        &lt;filter-mapping&gt;
          &lt;filter-name&gt;Charset Filter&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
        &lt;/filter-mapping&gt;
  
    &lt;!--CharsetFilter end--&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;com.bankofny.inx.omx.lc.web.util.SessionListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- Action Servlet Configuration --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;tradelc&lt;/servlet-name&gt;
          &lt;!-- Specify servlet class to use:
              - Struts1.0.x: ActionComponentServlet
              - Struts1.1:   ActionServlet
              - no Struts:   TilesServlet
          --&gt;
          &lt;!-- &lt;servlet-class&gt;org.apache.struts.tiles.ActionComponentServlet&lt;/servlet-class&gt; --&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;!-- &lt;servlet-class&gt;com.bankofny.inx.omx.lc.web.action.DevlActionServlet&lt;/servlet-class&gt; --&gt;
          &lt;!-- &lt;servlet-class&gt;org.apache.struts.tiles.TilesServlet&lt;/servlet-class&gt; --&gt;
  
          &lt;!-- Tiles Servlet parameter
              Specify configuration file names. There can be several comma
              separated file names
          --&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;definitions-config&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/tiles-defs.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
  
  
          &lt;!-- Tiles Servlet parameter
              Specify Tiles debug level.
              O : no debug information
              1 : debug information
              2 : more debug information
          --&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;definitions-debug&lt;/param-name&gt;
              &lt;param-value&gt;1&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;!-- Tiles Servlet parameter
              Specify Digester debug level. This value is passed to Digester
              O : no debug information
              1 : debug information
              2 : more debug information
          --&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;definitions-parser-details&lt;/param-name&gt;
              &lt;param-value&gt;0&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;!-- Tiles Servlet parameter
              Specify if xml parser should validate the Tiles configuration file.
              true : validate. DTD should be specified in file header.
              false : no validation
          --&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;definitions-parser-validate&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
  
  
          &lt;init-param&gt;
              &lt;param-name&gt;validate&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;init-param&gt;
              &lt;param-name&gt;debug&lt;/param-name&gt;
              &lt;param-value&gt;2&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;init-param&gt;
              &lt;param-name&gt;detail&lt;/param-name&gt;
              &lt;param-value&gt;2&lt;/param-value&gt;
          &lt;/init-param&gt;
  
          &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  
  
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;tradelc&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.do&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;    
  
  
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;21&lt;/session-timeout&gt;
      &lt;/session-config&gt;
  
      &lt;!-- The Welcome File List --&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
      &lt;error-page&gt;
          &lt;exception-type&gt;com.bankofny.inx.omx.lc.web.exceptions.LockException&lt;/exception-type&gt;
          &lt;location&gt;/errors/LockError.jsp&lt;/location&gt;
      &lt;/error-page&gt;
  
      &lt;!-- Struts Tag Library Descriptor --&gt;
      &lt;taglib&gt;
          &lt;taglib-uri&gt;/WEB-INF/struts-tiles.tld&lt;/taglib-uri&gt;
          &lt;taglib-location&gt;/WEB-INF/struts-tiles.tld&lt;/taglib-location&gt;
      &lt;/taglib&gt;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>tradelc-servlet.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:p="http://www.springframework.org/schema/p"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-4.0.xsd
          http://www.springframework.org/schema/mvc
          http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"&gt;
  
      &lt;context:annotation-config /&gt;
      &lt;!-- Scans within the base package of the application for @Components to configure--&gt;
      &lt;context:component-scan base-package="com.bankofny.inx.omx.lc.web.actions" /&gt;
  
      &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean id="messageSource"
          class="org.springframework.context.support.ResourceBundleMessageSource"&gt;
          &lt;property name="basename" value="resources.application" /&gt;
      &lt;/bean&gt;
  
  
      &lt;bean id="viewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="viewClass"
              value="org.springframework.web.servlet.view.JstlView"&gt;&lt;/property&gt;
          &lt;property name="prefix" value="/WEB-INF/jsp/"&gt;&lt;/property&gt;
          &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt;
      &lt;/bean&gt; 
  &lt;/beans&gt;
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>org.apache.jasper.JasperException: An exception occurred processing JSP page /cls/ClsEdit.jsp at line 12
  
  org.apache.jasper.JasperException: An exception occurred processing JSP page /cls/ClsEditBody.jsp at line 17
  
  14: 
  15: 
  16: &lt;tlc:in parameter="action" value="modify;create"&gt;
  17:     &lt;form:form&gt;
  18:     &lt;form:hidden path="ukey" /&gt;
  19:     &lt;!-- OMX00003517 UAT: June 2009: Invalid Password JavaScript Issue   Start --&gt;
  20:     &lt;input type="hidden" name="password1" value=""&gt;
  </code></pre>
  
  <p>Stacktrace:</p>
  
  <pre><code>java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
      org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:89)
      org.springframework.web.servlet.support.RequestContextUtils.getWebApplicationContext(RequestContextUtils.java:89)
      org.springframework.web.servlet.support.RequestContext.initContext(RequestContext.java:237)
      org.springframework.web.servlet.support.JspAwareRequestContext.initContext(JspAwareRequestContext.java:74)
      org.springframework.web.servlet.support.JspAwareRequestContext.&lt;init&gt;(JspAwareRequestContext.java:48)
      org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77)
      org.apache.jsp.cls.ClsEditBody_jsp._jspx_meth_form_005fform_005f0(ClsEditBody_jsp.java:241)
      org.apache.jsp.cls.ClsEditBody_jsp._jspx_meth_tlc_005fin_005f0(ClsEditBody_jsp.java:214)
      org.apache.jsp.cls.ClsEditBody_jsp._jspService(ClsEditBody_jsp.java:155)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
      org.apache.jsp.cls.ClsEdit_jsp._jspService(ClsEdit_jsp.java:87)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      com.bankofny.inx.omx.lc.web.action.CharsetFilter.doFilter(CharsetFilter.java:45)
  </code></pre>