tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16688] - JSP's not compiling
Date Sun, 13 Apr 2003 17:44:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16688>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16688

JSP's not compiling





------- Additional Comments From sdf@cnicorp.com  2003-04-13 17:44 -------
Windows installer only installs the NT service correctly if JAVA_HOME is 
defined and it points to some version of Java SDK. If JAVA_HOME is not defined
before the install, or it is incorrect, the installer mostly appears to work but
Tomcat cannot compile JSPs.

There are two problems in the Tomcat 4 script for Nullsoft Installer, 
tomcat.nsi, v 1.33. I apologize for not providing a patch, but I have no way to
rebuild the installer to test these changes. I hope some committer can use this
information to fix these problems.

1. Function findJavaPath does not validate the path it finds. If the JAVA_HOME 
env variable is incorrect because it was set to point to an old Java that is no 
longer on the machine, the installer ends up using an invalid path for things 
like the shortcuts on the Start menu and to copy the tools.jar file. The 
function should verify that the folder it found does exist, and if the
JAVA_HOME setting is not valid it should fall back to using the registry.

2. Function findJVMPath only uses the JAVA_HOME setting to find the correct JVM,
even though the findJavaPath function is capable of finding the Java folder from
the registry settings. findJVMPath should call findJavaPath instead of relying 
on just the JAVA_HOME environment variable. In its current form, if JAVA_HOME 
is not defined or is incorrect, findJVMPath always fails to find the Java SDK 
and falls back to using the JRE. This leaves Tomcat unable to compile JSPs, 
because the Ant code cannot find Javac.exe.


To fix a system that was installed this way, do the following:
1. Change registry entry for 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
Apache Tomcat 4.1\Parameters\JVM Library

from (adjust these paths to your machine and java version)
C:\Program Files\Java\j2re1.4.1_02\bin\client\jvm.dll

to
C:\j2sdk1.4.1_02\jre\bin\server\jvm.dll

2. Copy tools.jar from your-jsdk\lib\tools.jar to your-
tomcat\common\lib\tools.jar This may not be necessary, but the installer does 
attempt to copy this file so it won't hurt to do the same.

3. If you use the shortcuts on the Start Menu, edit their properties to fix the 
path to java.exe.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message