java.lang.NullPointerException at org.apache.jsp.index_jsp._jspInit

后端 未结 1 429
盖世英雄少女心
盖世英雄少女心 2021-01-22 21:12

When i try to run project deployed inside tomcat i get error like

java.lang.NullPointerException
    at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
            


        
相关标签:
1条回答
  • 2021-01-22 22:12

    I have searched regarding that and found that it might be problem of servlet-api.jar and jsp-api.jar but i have copied both from tomcat to my project's classpath

    It look like that you misunderstood the answers. Having them in your webapp's runtime classpath (WEB-INF/lib) is the whole cause of this problem! Get rid of them.

    The servletcontainer itself already ships with those libraries out the box. Providing randomly downloaded libraries from an arbitrary container of a possibly different make/version along with the webapp would only lead to this kind of problems. If you did this in order to "fix" compilation errors in your webapp project, then you should have solved it differently. See the below links for the how:

    See also:

    • java.lang.NullPointerException at org.apache.jsp.foo_jsp._jspInit(foo_jsp.java:22)
    • How do I import the javax.servlet API in my Eclipse project?
    0 讨论(0)
提交回复
热议问题