Discussion Locked

Tomcat/Jsp Configuration Problem

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

My system spec/ installed s/w as follows

Win2k Prof.(SP-4), Oracle 8i (8.1.6) with D2K(Forms & Report 6), Ms Office 2000, Visual Studio 6.
Recently i have installed j2sdk 1.4.2 (10) and Jakarta Apachi Tomcat-5.0.28.
I hv the following environment veriable.........

JAVA_HOME = C:\Java\j2sdk1.4.2_10
CATALINA_HOME=C:\Java\Tomcat 5.0
CLASSPATH=c:\Oracle\Ora81\orb\classes\yoj.jar;c:\Oracle\Ora81\orb\classes\share.zip;
%CATALINA_HOME%\common\lib\servlet-api.jar;%CATALINA_HOME%\common\lib\jsp-api.jar
PATH=c:\OraD2K\bin;c:\Oracle\Ora81\bin;%SystemRoot%\system32;%SystemRoot%;
%SystemRoot%\System32\Wbem;c:\Oracle\Ora81\orb\bin;
%JAVA_HOME%\bin;%CATALINA_HOME%\bin;

I hv created one simple jsp page in root folder under C:\Java\Tomcat 5.0\webapps\ROOT
as follows .....

Hello World.

but whenever i am trying to run ("http://localhost:8080/hw.jsp") the same page using IE6
it is showing "HTTP-Status 500" and the root cause as following.....
root cause
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(Htt

9 replies

by martin simons

In case you have not already done this, take a look at the comments in the catalina script (the startup script for tomcat), and setup a "setenv.bat" (as described in the comments in catalina.bat) in that bin directory for your server, then stop and restart the server. This may be your problem. I do not run tomcat on windows, but have seen similiar problems under other OS's, when I have forgotten to do this.

by martin simons

In case you have not already done this, take a look at the comments in the catalina script (the startup script for tomcat), and setup a "setenv.bat" (as described in the comments in catalina.bat) in that bin directory for your server, then stop and restart the server. This may be your problem. I do not run tomcat on windows, but have seen similiar problems under other OS's, when I have forgotten to do this.

by tref

I had this problem only last week. I can't be sure if I've got a complete answer for you but the issue was that tools.jar, which contains javac , was missing from the Ant's classpath. While The JDK itself was on the classpath for some reason I had to reference tools.jar separately for Ant. In your case you could probably get around this by moving/copying tools.jar into your TOMCAT_HOME/common/lib folder.

good luck.

by saurabhambekar

the problem is i think in the classpath. you already have oracle and other s/w in classpath. oracle comes with its own java distribution libraries. so your system might be refering to those libraries. try to put servlet.jar and tools.jar in classpath ahead of oracle path.
This might solve the problem.

by saurabhambekar

the problem is i think in the classpath. you already have oracle and other s/w in classpath. oracle comes with its own java distribution libraries. so your system might be refering to those libraries. try to put servlet.jar and tools.jar in classpath ahead of oracle path.
This might solve the problem.

by saurabhambekar

the problem is i think in the classpath. you already have oracle and other s/w in classpath. oracle comes with its own java distribution libraries. so your system might be refering to those libraries. try to put servlet.jar and tools.jar in classpath ahead of oracle path.
This might solve the problem.

by ebuild

CATALINA_HOME=C:\Java\Tomcat 5.0 is optional and can causes the given error
omit CATALINA_HOME from environment veriable

by nitingautam

Reason is that it is not able to find the tools.jar that contains the compiler .

it should be in ur classpath.

add the JAVA_HOME & PATH manually to Tomcat\bin\ startup/catalina batch file

it'll work perfectly.

Nitin

This discussion is closed to new replies.