This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "I DON Watch "I DON New topic
Author

I DON'T UNDERSTAND

Ken Tab
Greenhorn

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(SunJavaCompiler.java:136)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:272)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
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.
/Rene
[ July 06, 2002: Message edited by: Rene Larsen ]

Regards, Rene Larsen
Dropbox Invite
 
jQuery in Action, 2nd edition
 
subject: I DON'T UNDERSTAND