This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes Tomcat won't always compile JSP Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Tomcat won Watch "Tomcat won New topic
Author

Tomcat won't always compile JSP Files

Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
I have Apache and Tomcat together on a WinNT 4.0 but something is strange.
I start Apache as a service.
I can start Tomcat A. as a service or
B. with a batch file
The batch file is :
start "Tomcat" "%JAVA_HOME%\bin\java"
-Djava.endorsed.dirs="%CATALINA_HOME%\bin;%CATALINA_HOM%\common\lib"
-classpath "%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar"
-Dcatalina.base="%CATALINA_HOME%"
-Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_HOME%\temp"
org.apache.catalina.startup.Bootstrap start

Installing the service is :
"%CATALINA_HOME%\bin\tomcat.exe"
-install Tomcat
"%JAVA_HOME%\jre\bin\server\jvm.dll" -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar" -Dcatalina.home="%CATALINA_HOME%"
-Dcatalina.base="%CATALINA_HOME%"
-Djava.endorsed.dirs="%CATALINA_HOME%\bin;%CATALINA_HOME%\common\lib"
-Djava.io.tmpdir="%CATALINA_HOME%\temp"
-start org.apache.catalina.startup.BootstrapService
-params start
-stop org.apache.catalina.startup.BootstrapService
-params stop
-out "%CATALINA_HOME%\logs\stdout.log"
-err "%CATALINA_HOME%\logs\stderr.log"
Starting Tomcat with the Batch, my JSP projects compile just fine
but starting Tomcat as a service the JSP projects will not compile !!!
For simple.jsp, a simple$jsp.java file is generated then it stops !!!
It doesn't go on to compile it and make the necessary simple$jsp.class file for
my simple.jsp page.
Using the batch method the simple$jsp.java file is
both generated *And* the simple$jsp.class file is created !!.
But that dos box hanging there is ugly.
With the class file generated by the batch I can look at the simple.jsp with
the Tomcat as a service or as a batch file.
Why is the service ready to write the java but not willing generate the class file?
Any ideas ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat won't always compile JSP Files
 
Similar Threads
Tomcat(jdk1.3.1) - Win2k service - GC output
Bootstrap and Tomcat 4.1
Piping the stack traces to a file
Tomcat Service on Windows 2003 server
log4j problem