Subject: The working case for my web application deploy
Author: WebSpider
In response to: Increase Java heap for Tomcat
Posted on: 11/16/2011 06:55:00 PM
Step 1) Keep Tomcat configuration untouched:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
Step 2) Copy myConext.war onto <TOMCAT>/webapps:
+ .. webapps
+ .. jsp-examples
+ .. ROOT
+ .. webdav
.... myContext.war
Step 3) Startup Tomcat
+ .. webapps
+ .. jsp-examples
+ .. ROOT
+ .. myContext
+ .. css
+ .. img
+ .. js
+ .. WEB-INF
+ .. classes
+ .. lib
.... web.xml
.... index.html
+ .. webdav
.... myContext.war
Step 4) That's it. No configuration about <context/> is needed since it's under webapps already. The web application can be accessed by:
http://localhost:8080/myContext/index.html
Note: The war file name turns to be the context name of your web application. While building war file, make sure the war file name is the context name rather than the project name:
+ .. myEclipseWorkplace
+ .. myProject1 <--right click on this to export web/war file
+ .. .settings
+ .. src
+ .. myContext <--choose this name as war file name
+ .. css
+ .. img
+ .. js
+ .. WEB-INF
+ .. classes
+ .. lib
.... web.xml
.... index.html
+ .. myProject2
+ Servers
>
> On 10/12/2011 09:37:25 PM
Linux wrote:
Edit the Tomcat startup script "bin/catalina.sh", find the section below:
if [ -z "$LOGGING_MANAGER" ]; then
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
else
JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
fi
and then add:
JAVA_OPTS="$JAVA_OPTS -Xms128M -Xmx512M"
You'll have to restart Tomcat with bin/shutdown.sh; bin/startup.sh for this change to take effect.
References: