I have 2 web-applications in Tomcat 5. Now for Java I have j2sdk1.4.2 & j2sdk1.3..
Now One of my application needs j2sdk1.4.2 while other can run only with j2sdk1.3.. (This is an old project & there are java class package norms - like every class should be in a package to import it now. But earlier it was not strict).
Means this is absoulte for me to run one application with version 1.3 while other with 1.4.
But I can set Java_Home env. varibale only once. How can I tell my each web-application to take thier own jdk version in compiling & running. Is this allowed in J2EE/Web-Containers.
Please suggest if there is any such setting which makes it possible.
I don't think that you can do this without running 2 instances of Tomcat. Tomcat is a Java program and any web applications running in a Tomcat instance run in the same JVM. You would have to specify different JAVA_HOME values in the batch file that launches each instance, and you would have to specify a different port for each instance to run on.
It is probably a better idea just to fix the uses of the default package and not bother with running 2 Tomcat instances.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.