Hello everyone. I'm new to using JSP and just picked up the book "Beginning JSP 2-From Novice to Professional" the other day. I'm trying to run the first jsp examples, but I keep getting an exception error:
I checked to make sure that my JAVA_HOME environment variable is pointing to my SDK directory, it is. And Tomcat is already installed, and I can view the main page, by going to localhost:8080. I'm not sure what else to check. So, if some kind frined could point me in the right direction, I'd greatly appreciate it.
It doesn't look like C:\jdk is the JAVA_HOME for your JDK 1.4.2 installation.
The folder will be named something like "jdk1.4.2" and would contain the following folders - bin - include - jre - lib Change JAVA_HOME to the right jdk 1.4.2 installation. CATALINA_HOME should point to the directory in which Tomcat 5 has been installed.
The lib folder contains tools.jar which has your javac utility. Sheldon Fernandes [ October 01, 2004: Message edited by: Sheldon Fernandes ]
Joined: Aug 18, 2004
If you do not have a JDK installed, you could still work with a JRE. But you would need tools.jar to be placed somewhere in your server classpath.
For more information on how to setup Tomcat click here.
The below is an extract relevant to your problem.
Java location: The installer will use the registry or the JAVA_HOME environment variable to determine the base path of the JDK or a JRE. If only a JRE (or an incorrect path) is specified, Tomcat will run but will be unable to compile JSP pages at runtime. Either all webapps will need to be precompiled (this can be easily done using the Tomcat deployer), or the lib\tools.jar file from a JDK installation must be copied to the common\lib path of the Tomcat installation.
Joined: Feb 22, 2001
the lib\tools.jar file from a JDK installation must be copied to the common\lib path of the Tomcat installation.