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

error - unable to compile class for jsp

Santosh sab

Joined: Apr 20, 2007
Posts: 1
I am using tomcat 5.0.30 and j2re1.4.1_01
i am getting following error whenever request is forwarded to jsp

In the java properties of tomcat i am having following path in the classpath field - C:\Program Files\Java\j2re1.4.1_01\lib\tools.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\bootstrap.jar

I checked the tools.jar file in the above mentioned path and it contains MAIN class in folder

Kindly tell me where to make changes so that the jsp gets compiled
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
Does the value of JAVA_HOME in your environment point to
C:\Program Files\Java\j2re1.4.1_01

Tomcat totally ignores the CLASSPATH environment variable.

See the class-loader-howto.html file under tomcat-docs in a typical Tomcat installation for more about how Tomcat looks for classes.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Welcome to JavaRanch!

We're pleased to have you here with us in the Tomcat forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here

Tomcat 5.0 and lower requires a full JDK (j2sdk) in order to compile JSPs.
Starting with 5.5, Tomcat ships with it's own compiler and can run with only a JRE.

Install a full JDK and make sure your JAVA_HOME environment variable points to it.

[ April 27, 2007: Message edited by: Ben Souther ]
[ April 27, 2007: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: error - unable to compile class for jsp
It's not a secret anymore!