title: Correct way to solve "javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation"?
body: <p>I moved my war file (which ran on tomcat 7 environment) to tomcat 6 environment.Then I get this exception .And as solutions I tried <a href="https://stackoverflow.com/questions/8487048/java-lang-linkageerror-javax-servlet-jsp-jspapplicationcontext-getexpressionfac">This answer</a>.But still no good!! I want to run on a remote machine which has tomcat 6 only.Please help me out..</p>
  
  <p><strong>Exception</strong></p>
  
  <pre><code> javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/el/ExpressionFactory"
          org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
          org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
          org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
          org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
          org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
          org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
          org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  
      root cause
  
      java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/el/ExpressionFactory"
          java.lang.ClassLoader.defineClass1(Native Method)
          java.lang.ClassLoader.defineClass(ClassLoader.java:800)
          java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2331)
          org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:976)
          org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1451)
          org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
          org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
          org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
          java.lang.Class.getDeclaredFields0(Native Method)
          java.lang.Class.privateGetDeclaredFields(Class.java:2397)
          java.lang.Class.getDeclaredFields(Class.java:1806)
          org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:181)
          org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:148)
          org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
          org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
          org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
          org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
          org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
          org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
          org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
          org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
          org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  </code></pre>