Tomcat 7 fails to compile JSP Pages

前端 未结 3 401
伪装坚强ぢ
伪装坚强ぢ 2021-01-24 15:26

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



        
相关标签:
3条回答
  • 2021-01-24 16:03

    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.

    0 讨论(0)
  • 2021-01-24 16:12

    Adding this line to context.xml should resolve this issue.

    <Loader delegate="true">
    
    0 讨论(0)
  • 2021-01-24 16:25

    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.

    0 讨论(0)
提交回复
热议问题