reset password
Author Message
jbrooks
Posts: 5
Posted 21:58 Apr 04, 2011 |

When I attempt to run HelloJSTL.jsp I get the following error

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

I believe I have the correct jar files in my path but I haven't been able to resolve this issue, has anyone else encountered this problem?

Last edited by jbrooks at 21:58 Apr 04, 2011.
abajpai
Posts: 52
Posted 22:04 Apr 04, 2011 |

a NoClassDef error usually means that it cant find the code for the class that is needed. In this case, it would mean your servlet. my guess is something is out of place. Have you tried checking that the pathnames and urls are correct? and if corresponding files  with the correct file names are at the correct location?

cysun
Posts: 2935
Posted 10:00 Apr 05, 2011 |

That class is in jsp-api.jar, which comes with Tomcat. I think for some reason Eclipse did not include all the required jar files for a Dynamic Web Project. Just delete the project then recreate it and see if it fixes the problem.