I'm completely new to J2EE and my boss said to me to make a web page quickly based on J2SE project I worked on.
So, I started from Hello example, then tried to use J2SE project right into J2EE project.
I used eclipse and in property-java build path-projects of J2EE project, I added all the J2SE project related with my job, and created a Java class that invokes J2SE class.
Then I add jsp like this
<%@ page import="package.classNameHere" %>
<%
classNameHere tc = new classNameHere();
tc.mainRun();
%>
mainRun looks like this
public void mainRun() {
try {
new J2EEClassThatInvokesJ2SEClass(); // I changed name
} catch (Exception e) { // exception is needed
throw new RuntimeException(e);
}
}
(I changed class name for security problem)
but it occurs this error
Servlet.service() for servlet [jsp] in context with path [/package] threw exception [javax.servlet.ServletException: java.lang.NoClassDefFoundError: (Another class that I added from property)] with root cause
Is it unavailable to run J2SE class from J2EE project?