Monday, June 11, 2007

Deploying web applications that use different Java versions.

If you have a Tomcat installation that uses, say, Java 1.4.2, you can only deploy web application that are built with Java <= 1.4.2. If you need to run a Java 5.0 web application, you need to set tomcat to use JRE 5.0 (by setting the JAVA_HOME or JRE_HOME enviroment variables), but this might possibly break older applications that use Java 1.4.2.

Most probably, you'll need to have a separate installation of tomcat, that will use Java 5.0. It is possible to have two or more instances of tomcat running, and these can be either the same version or different versions. However, the two instances need to listen to different ports. The server port is specified in file $CATALINA_HOME/conf/server.xml. I noticed however that in order to get it to work, we need to change all the ports and not just the server port.



This needs cleanup/rewritting

No comments: