I have an application that works perfectly fine on Tomcat 6. I have now moved this application to Tomcat 7 and the JSPs are throwing below compilation exception
Finally found the conflicting jar. It is org.osgi.foundation-1.2.0.jar. However this jar is required by another dependency that I am using so need to find a way to resolve this issue.
Adding this line to context.xml should resolve this issue.
<Loader delegate="true">
This error is typically caused by compiling JSPs on Tomcat 6 and then trying to run them on Tomcat 7.
If you are pre-compiling your JSPs, make sure that all the Tomcat libraries you are using for pre-compilation are from exactly the same version of Tomcat as the JSPs will be running on.
If you are compiling JSPs on the fly, make sure you empty the work directory when switching from Tomcat 6 to Tomcat 7.
Also make sure that your Tomact 7 installation does not contain any stray libraries from a Tomcat 6 installation and that you don't include any Tomcat JARs with your web application.