General discussion

Locked

Tomcat/Jsp Configuration Problem

By san_tch ·
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 .....
<html>
<body>
Hello World.
</body>
</html>

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:75
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

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Martin Simons In reply to Tomcat/Jsp Configuration ...

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.

Collapse -

by Martin Simons In reply to Tomcat/Jsp Configuration ...

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.

Collapse -

by Martin Simons In reply to

Sorry, problem submitting. Did not mean to submit twice.

Collapse -

by tref In reply to Tomcat/Jsp Configuration ...

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.

Collapse -

by saurabhambekar In reply to Tomcat/Jsp Configuration ...

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.

Collapse -

by saurabhambekar In reply to Tomcat/Jsp Configuration ...

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.

Collapse -

by saurabhambekar In reply to Tomcat/Jsp Configuration ...

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.

Collapse -

by ebuild In reply to Tomcat/Jsp Configuration ...

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

Collapse -

by nitingautam In reply to Tomcat/Jsp Configuration ...

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

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums