This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes I DON'T UNDERSTAND Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "I DON Watch "I DON New topic


Ken Tab

Joined: Jul 05, 2002
Posts: 3
hello, I just installed tomcat 4.03 and I can't seem to view any jsp pages, specifically Hello.jsp . Here is the class path I defined in setclasspath.bat :
set CLASSPATH=.;C:\devel;C:\jakarta-tomcat-4.0.3\common\lib\servlet.jar
Below is the exception I keep getting, any suggestions?
root cause
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at org.apache.jasper.compiler.SunJavaCompiler.compile(
at org.apache.jasper.compiler.Compiler.compile(
at org.apache.jasper.servlet.JspServlet.loadJSP(
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

You should remove the classpath entry from 'setclasspath.bat' and put these in you global classpath. The classpath should only look like this 'set CLASSPATH=%JAVA_HOME%\lib\tools.jar' in setclasspath.bat. Remembet to add JAVA_HOME to your global envionment too. Tomcat will then find what it need by it self...
To run JSP pages you need to have at least tools.jar from the JDK package.
[ July 06, 2002: Message edited by: Rene Larsen ]

Regards, Rene Larsen
Dropbox Invite
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
It's not a secret anymore!