Archive for the ‘Tomcat’ category

How to extract a .war file

August 11th, 2010

How to extract a .war file

If your hosting provider supports Tomcat, but not .war files, you can extract your .war file in your public_html folder to run your Tomcat application from there.

# jar xvf filename.war

  • Share/Bookmark

Increase Memory Available for Tomcat & Java

June 18th, 2010

First, open the following file in your favorite editor:

# vi /var/cpanel/tomcat.options

Insert the following 2 lines (if not already present):

Xmx200M
Xms100M

Xmx is the upper limit and Xms is the lower limit.

Once done, restart the Tomcat service:

#/scripts/restartsrv_tomcat

  • Share/Bookmark

Tomcat java.lang.OutOfMemoryError

September 24th, 2009

SEVERE: Caught exception (java.lang.OutOfMemoryError: Java heap space) executing org.apache.jk.common.ChannelSocket$SocketAcceptor@1e9c3f, terminating thread
Sep 24, 2009 2:02:23 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception

If you’re getting this error, place the following in /var/cpanel/tomcat.options,

-Xmx256m
-Xms256m

Then restart tomcat via /scripts/restartsrv_tomcat.

You’ll now see tomcat restart with your options:


[root@hosting logs]# vi /var/cpanel/tomcat.options
[root@hosting logs]# /scripts/restartsrv_tomcat
Adding in custom Tomcat option(s): -Xmx256m
Adding in custom Tomcat option(s): -Xms256m

  • Share/Bookmark

cPanel Web Site Hosting by IntraHost