1. 程式人生 > >org.apache.jasper.JasperException: java.lang.ClassCastException

org.apache.jasper.JasperException: java.lang.ClassCastException



exception 
org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor




在tomcat中conf/context.xml裡的Context節點後面加<Loader delegate="true" />


<Context>
 <Loader delegate="true" /> 

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
 
    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>