tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: How to deploy Java application into Tomcat in Linux
Date Wed, 02 Apr 2014 21:00:00 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Randir,

On 4/1/14, 1:13 AM, Randhir Singh wrote:
> As per my understanding, the steps to deploy a Java application on
> Tomcat (5.X/6.X) in Linux would be as follows:
> 
> 1)      Install Tomcat on Linux

Yes. Make sure it is a supported version of Tomcat.

> 2)      Add a host entry in $TOMCAT_HOME/conf with the syntax
> like-
> 
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>  <Host name="xxx.co.in" debug="0" 
> appBase="/opt/setuponm/jakarta-tomcat-5.0.28/sterlite/reportstool"
> 
> unpackWARs="false" autoDeploy="false">
> 
> <Alias>reports.fion.co.in</Alias>

This needs to go into CATALINA_BASE/conf/server.xml. We use
CATALINA_BASE to identify the installation of Tomcat that is actually
being launched. CATALINA_HOME is where Tomcat is installed, while
CATALINA_BASE is where it is configured in a multi-instance setup
(single install, multiple configuration). TOMCAT_HOME and
CATALINA_HOME could be considered the same thing, though TOMCAT_HOME
is not a recognized environment variable in any Tomcat script.

> <Context path="" 
> docBase="/opt/setuponm/jakarta-tomcat-5.0.28/sterlite/reportstool"
> debug="0"
> 
> reloadable="false" crossContext="false" />

You should not put the above in CATLAINA_BASE/conf/server.xml.
Instead, you should have a META-INF/context.xml file in your web
application, and your WAR file should be ROOT.war (case matters, even
on case-insensitive filesystems) if you want to deploy as the ROOT
context.

The "debug" attribute is not valid in any supported version of Tomcat:
you should remove that. You've been reminded by many commenters, but
I'll mention it again: you are recklessly behind in your Tomcat
version. You need to upgrade.

- -chris

> The above code would assign the host name to access the URL, gives
> the location of the web application pointed out by appBase &
> context path.
> 
> 3)      Start Tomcat.
> 
> Please let me know if the steps above are correct and also please
> let me know in detail if the steps are not correct.

Did you try the above? Did it work?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTPHpQAAoJEBzwKT+lPKRYdaIP/ReQ5n4U5Q+AWJoOX+8s8Pr9
rTGcodPw7wMmBi8PLs1ga6OxFjB3DOLr9G4CG+oxEvvob0ZcldCW0AELaT0iXDOD
fdW6LZ7Sbsgh+t7uL/ROW3CHhrY9vTcKeGBOuTdcCcmrYjswCWpt7h7aDLtq1cJ/
IZPx3RU5J/5odkhAr8tzRWnXxBImWuPQbE7n3k1LdiJHrl48UUEL9s+WHZM1S3ng
RS8czgp2T4TCMkK9bZDjBXDMQXCXL1ixoXYhm9vNski2iqyEbQXqFQsjkwS2W7sE
Wu3MqSt2H9hEeUnH3WL+wl7vJCgOvvfU4cAGAm37T9F2G9ojWSzASxqSWYaF6/bb
4E5hk++UAML2MAyn6zGq83zWmWF6rASIiXTgM1ny7QCVcxn8B+a3oQT2y3wy5kEy
H2TNLsLGlLaBLtWaWKvh43kqclP3wXwvkiycrHq71p5aEdgkmqHZ63gezdQat7YD
zf/EihI3WzfL962whYbSUXLwXdJAFAdTdOq3MFiIMVwkraFBNT8xbqyFtLdzcBZx
pBvmUoAk1crluiFF+9XxGFsvP2KgzF/Wpj3vv2QocHgaQhBRh9gMtUp/LR5kmccr
RFCrpSHmHGHH2zT4ic72DXqX2D7MmJHvU5FSRfCjfIfwDnsShNTRpL+Iu0htse94
N09PveKmDuHPKxjqrFZ0
=EDwc
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message