File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Trying to run simple JSP script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Trying to run simple JSP script" Watch "Trying to run simple JSP script" New topic

Trying to run simple JSP script

Joe Tseng

Joined: Nov 09, 2004
Posts: 23
I recently installed Tomcat and Eclipse and used the Sysdeo Eclipse plugin to have it integrate with Tomcat. I created a JSP file, tried to access it, and I got an error:

Nov 11, 2004 11:59:45 AM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Javac exception
Unable to find a javac compiler; is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

I have no idea how to fix this; is this a Tomcat or Eclipse config issue? I looked in my Windows CLASSPATH entry and it was fine. I would think Tomcat wouldn't run if java wasn't visible.
Guido Schoepp

Joined: Oct 14, 2004
Posts: 21
Do you have your JAVA_HOME environment variable set?

Jeremy Wilson
Ranch Hand

Joined: Feb 18, 2003
Posts: 166
I have had this problem in some instances where even setting java_home did not appear to work. One quick and dirty solution is to place the tools.jar from the jdk installation into the tomcat common libs folder, I know this is not the best way to do this but it should get the job done.

Jeremy Wilson
Joe Tseng

Joined: Nov 09, 2004
Posts: 23
OK I did the copying of the tools.jar to common\lib and it works now. Thx.
I agree. Here's the link:
subject: Trying to run simple JSP script
It's not a secret anymore!