wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Bootstrap and Tomcat 4.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Bootstrap and Tomcat 4.1" Watch "Bootstrap and Tomcat 4.1" New topic
Author

Bootstrap and Tomcat 4.1

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
On Windows XP with J2SE 1.4.2_03, I've Tomcat 4.0.6 installed at
K:\java\tomcat\tomcat-4.0.6
and Tomcat 4.1.27 installed at
K:\java\tomcat\tomcat-4.1.27
Using the CATALINA_HOME/bin/startup.bat files of each installation, I can start and run the two different versions of Tomcat just fine. So, I'm pretty sure things are installed and configured properly.
Using the following command, I can run Tomcat 4.0.6 and everything seems to work properly.
the Tomcat 4.0.6 startup command - works
java -Djava.endorsed.dirs=K:\java\tomcat\tomcat-4.0.6\bin;K:\java\tomcat\tomcat-4.0.6\common\lib -Dcatalina.base=K:\java\tomcat\tomcat-4.0.6 -Dcatalina.home=K:\java\tomcat\tomcat-4.0.6 -Djava.io.tmpdir=K:\java\tomcat\tomcat-4.0.6\temp -Dfile.encoding=windows-1252 -classpath K:\java\j2sdk1.4.2_03\lib\tools.jar;K:\java\tomcat\tomcat-4.0.6\bin\bootstrap.jar org.apache.catalina.startup.Bootstrap start
I'd like to run Tomcat 4.1.27 in a similar fashion. Using the following command, Tomcat 4.1.27 starts and serves html pages fine, but when trying to access a JSP page, it just spits out errors.
the Tomcat 4.1.27 startup command - doesn't work
java -Djava.endorsed.dirs=K:\java\tomcat\tomcat-4.1.27\bin;K:\java\tomcat\tomcat-4.1.27\common\lib -Dcatalina.base=K:\java\tomcat\tomcat-4.1.27 -Dcatalina.home=K:\java\tomcat\tomcat-4.1.27 -Djava.io.tmpdir=K:\java\tomcat\tomcat-4.1.27\temp -Dfile.encoding=windows-1252 -classpath K:\java\j2sdk1.4.2_03\lib\tools.jar;K:\java\tomcat\tomcat-4.1.27\bin\bootstrap.jar org.apache.catalina.startup.Bootstrap start
the command prompt error when accessing a JSP
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
at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCom
piler(CompilerAdapterFactory.java:139)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:835)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:320)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
the error displayed to the browser when accessing a JSP
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
----
So, any ideas on getting Tomcat 4.1.27 started in this fashion?
[ April 15, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Upon further inspection of the dizzying batch files that ship with Tomcat, I think I've figured it out.
With Tomcat 4.1.27, the java.endorsed.dirs takes on a different value.
The following command seems to work fine.
java -Djava.endorsed.dirs=K:\java\tomcat\tomcat-4.1.27\common\endorsed -Dcatalina.base=K:\java\tomcat\tomcat-4.1.27 -Dcatalina.home=K:\java\tomcat\tomcat-4.1.27 -Djava.io.tmpdir=K:\java\tomcat\tomcat-4.1.27\temp -Dfile.encoding=windows-1252 -classpath K:\java\j2sdk1.4.2_03\lib\tools.jar;K:\java\tomcat\tomcat-4.1.27\bin\bootstrap.jar org.apache.catalina.startup.Bootstrap start
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bootstrap and Tomcat 4.1