Tuesday, July 25, 2006


Installation TomCat(5.5.17) Client Deployer on Linux(CentOS 4.2)



First :-



# chmod g+r ~tomcat
# chmod g+x ~tomcat




In case when TCD is supposed to be installed on the same host
with server have "ant" installed by tomcat,where tomcat is account used for server install,otherwhise (after creation account tomuser):



1.Perform installation of JDK 1.5 and "ant" by tomuser.
2.Just for example, make assignments:-
ANT_HOME=~tomuser/apache-ant-1.6.5
JAVA_HOME=~tomuser/jdk1.5.0_06
Then modify PATH as follows:
export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH




Create account tomuser :



# adduser tomuser -g users




with .bash_profile for local deployment



# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

export JAVA_HOME=~tomcat/jdk1.5.0_06
export ANT_HOME=~tomcat/apache-ant-1.6.5
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
export PATH
export DISPLAY=:0.0
unset USERNAME




or with .bash_profile for remote deployment



# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

export JAVA_HOME=~tomuser/jdk1.5.0_06
export ANT_HOME=~tomuser/apache-ant-1.6.5
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
export PATH
export DISPLAY=:0.0
unset USERNAME




Login as tomuser and untar deployer package.

Then change directory to ~tomuser/apache-tomcat-5.5.17-deployer.

Create file deployer.properties under /home/tomuser/apache-tomcat-5.5.17-deployer

with content:-



name="compile.debug" value="true"
name="compile.deprecation" value="false"
name="compile.optimize" value="true"




Modify two rows in build.xml:-



<property name="webapp" value="bunk-support"/>
<property name="path" value="/bank-support"/>




In case when TomCat Server is running on the remote host with
IP address: IP-Address and name: Host_Name ,entry
"http://localhost:8080/manager" in build.xml
should be replaced by "http://IP-Address:8080/manager" or by "http://Host_Name:8080/manager" .

Create bank-support directory and download source for chapter 15
of Marty Hall's "Core Servlets and JavaServer Pages" book (second edition,v 1). Create file ./WEB-INF/web.xml:-


Then compile with "javac" Bean Class BankCustomer.java under WEB-INF/classes before calling "ant".
Servlet ShowBalance.java would be better
to compile during "ant" build phase.

Jasper Compiler will be also invoked to compile all JSPs.


Snapshot of source directory:-


Snapshot of target directory:-