org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

前端 未结 7 1257
有刺的猬
有刺的猬 2020-12-16 01:02

I have a web service project implemented in java and it also contains jsp pages. I deploy it on jetty 8.1.5 on my machine and it works normally. But when I deploy on a windo

7条回答
  •  无人及你
    2020-12-16 01:17

    That can happen if your webapp ships with servletcontainer-specific JAR files such as jasper.jar, jetty.jar servlet.jar, etc in the /WEB-INF/lib for some unclear reason. This is in turn conflicting with with a different versioned JAR file on the target servletcontainer.

    Remove that servletcontainer-specific JAR file from your webapp's /WEB-INF/lib. It doesn't belong there. It's supposed to be already supplied by the servletcontainer itself.

    See also:

    • How do I import the javax.servlet API in my Eclipse project? (this doesn't exactly answer your concrete problem, but this is at least technically the same core problem which should give you a better understanding of this common starter's mistake)

提交回复
热议问题