• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bootstrap and Tomcat 4.1

 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic