I had this kind of problem recently, and found the easy way to configure my system :
The JSDK 1.2 has a built in 'extension' mechanism which you can use to compile and run with any classes you wish to have available for any project.  Simple add the extensions (ie servlet.jar, jasper.jar etc ) to the "jsdk1.2/jre/lib/ext" directory.  Ensure you have JAVA_HOME environmental variable set to the jsdk 1.2 directory, and that the jsdk1.2/bin directory is in your PATH.  Finally make sure there is no CLASSPATH set, as this just serves to stuff things up.
I am using Tomcat with JDSK 1.2 - and it is working with both Windows98 and Caldera Linux.
Short note re Caldera Linux : I believe Kaffe is supplied as default with Caldera Linux.  The java and javac commands are in the usr/bin directory, in effect stuffing any attempt to add paths to new versions of Java.  I had to delete kaffe, including all the java programs in /usr/bin before I got Java 1.2 working.
This will probably however stuff the current version of JServ if you have it installed first (as I did) so you will need to run tomcat instead.  I have spent several weeks on a rather steep learning curve on Linux/Java/Servlets/JDBC.  I am now writing Java Servlets which access my account system interbase database. 
----- Original Message -----
From: Don Metzler
To: tomcat-user@jakarta.apache.org
Sent: Monday, March 20, 2000 6:52 PM
Subject: NoClassDefFoundError when running JSPs

I can run the servlet examples via Tomcat.  However, each time I attempt to access a JSP, I get an HTTP 500 Internal server error on the client web browser.
The Tomcat window in NT shows:
Starting tomcat. Check logs/tomcat.log for error messages
Unhandled error! You might want to consider having an error page to report such
errors more gracefully
java.lang.NoClassDefFoundError: sun/tools/javac/Main
        at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:128)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code)
        at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:412)
        at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:147)
        at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:159)
        at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:146)
        at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334)
        at java.lang.Thread.run(Thread.java:479)
This seems to indicate that I am missing a Java class or JAR.
I do have J2EE installed over the J2SE.  Any idea what I am missing?