Search code examples
javajsf-2classnotfoundexception

JSF 2.0 project with eclipse and tomcat 7


I am creating a new JSF 2.0 project and getting:

java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config

Exception. If I copy paste jstl-api 1.2 and jstl-impl-1.2 jar WebContent\WEB-INF\lib some other exception

at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546) at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:364) at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)

is getting generated infinitely. What is going wrong?


Solution

  • I think you should remove jstl api 1.2 and jstl impl 1.2 and use jstl 1.2. By the way did you use jsp api jar? if your answer is yes, then the possible cause of the first exception is the conflict of it with the jsp api jar in the tomcat lib. Should Visit the page of Mkyoung while starting JSF 2.0. This will help you a lot!

    Happy Coding!