I have two Java Projects. One is a normal Java Project. I want to integrate this Java Project in my dynamic webproject. That works fine at first. I can easily integrate the project over the Java Build Path.
But if i call “MyClass” from the dynamic Web Project I always get this exception:
javax.servlet.ServletException: java.lang.NoClassDefFoundError: my/project/MyClass
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
org.apache.jsp.api_jsp._jspService(api_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
This probably means that the other normal javaproject deployed to the Server.
Right click the
Dynamic Web Project->Properties->Deployment Assembly->Add->Project->The None Dynamic Web Project.This will bundle the other eclipse porject automatically into the WARs lib folder.