Tomcat Apache 5.5

Published on December 12, 2007

Some technicalities about Tomcat.

You can unrar a war file in an external hard disk, and have Tomcat point to it.
The simpler way is to change under server.xml, change appBase=”webapps” to appBase=”J:/MyApps/”. All applications will then be hosted under that directory.

But there are other ways too, such as adding <context> a Context element.

<context docbase="J:/MyApps/MyWeb" path="/MyWeb">

To copy .war to Tomcat webapps after building in netbeans, add the following to build.xml:

<target name="-post-dist">
<target><copy file="${dist.war}" todir="C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps">

Failed to start apache with service-specific error 0x0. Tomcat service log error shows “Failed creating java C:\Program Files\Java\jre1.6.0_03\bin\client\jvm.dll”. This is due to msvcr71.dll not found by Tomcat.

Read this solution

Running multiple Tomcat Containers? This topic is not detailedly explained.. Here are some help..

<host name="localhost" appbase="H:/web" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false"></host>

To setup a web server to serve .cab OTA installation for Windows Mobile application, add to web.xml:


Increase Java Heap Size

The default heap size for Tomcat is pretty small. When the memory used is more than the maximum specified, a OutOfMemoryError is frequently encountered.

A convenient way is to put this in catalina.bat:

set CATALINA_OPTS="-Xmx256m"
[JavaHowto]( - For more details..