This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I DON'T UNDERSTAND
 
Similar Threads
JSP Tag
JasperException: Unable to compile class for JSPerror:
Can someone help me out?
web application not coming up when tomcat4.0.6 is started as a service
JSP in Tomcat !!!