0

Today I found JSP throw NullPointException error in the following line

_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory()

I found delete

jsp-api-2.1.jar

can fix the issue, but don't know why. Anyone knows the reason for this error.

I am using Tomcat 6.0.33

user705414
  • 20,472
  • 39
  • 112
  • 155
  • Related: [How do I import the javax.servlet API in my Eclipse project?](http://stackoverflow.com/q/4076601) – BalusC Apr 13 '13 at 17:25

1 Answers1

1

Web apps must not provide their own Java EE libraries; they will conflict with the server's versions. It can create a variety of errors like this.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Dave Newton
  • 158,873
  • 26
  • 254
  • 302
  • still don't understand why. it is very hard to associate this kind of error to the cause. – user705414 Nov 10 '11 at 13:00
  • @user705414 Yes, it can be--and the error thrown can vary. It's just one of those things you learn to check when you get an unexplainable error that looks related to the servlet or JSP APIs :) – Dave Newton Nov 10 '11 at 13:05