“javax.servlet.ServletException: non-HTTP request or response” in JBoss

前端 未结 3 1496
醉酒成梦
醉酒成梦 2021-01-17 19:31

My jboss is throwing undescriptive error while trying to run my application (spring mvc). It deploys ok, and this exception doesn\'t tell me anything useful so I don\'t real

相关标签:
3条回答
  • 2021-01-17 19:41

    Try removing servlet-api jar from your WAR file.

    0 讨论(0)
  • 2021-01-17 19:47

    If you are using Maven, you can just set the scope of the servlet-api to provided.

    0 讨论(0)
  • 2021-01-17 19:52

    This gets thrown in HttpServlet.service(ServletRequest, ServletResponse) when the parameters can't be cast to HttpServletRequest and HttpServletResponse respectively.

    That means one of two things:

    • the parameters are of the wrong type (unlikely) or
    • some filter is using the wrong copy of those types, loaded with a wrong classloader (for example if you deliver your own copy of servlet-api-x.x.jar with your webapp).
    0 讨论(0)
提交回复
热议问题