0% found this document useful (0 votes)
98 views3 pages

Apache Tomcat

The document discusses Apache Tomcat as a runtime for Java-based web applications, explaining how to install Tomcat on Linux, deploy web applications to it, and troubleshoot issues using log files, as well as how to configure the Tomcat manager application to manage deployed applications.

Uploaded by

Amitha R H
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views3 pages

Apache Tomcat

The document discusses Apache Tomcat as a runtime for Java-based web applications, explaining how to install Tomcat on Linux, deploy web applications to it, and troubleshoot issues using log files, as well as how to configure the Tomcat manager application to manage deployed applications.

Uploaded by

Amitha R H
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Apache Tomcat 1

Apache 1

Apache Tomcat 1

What is web application?


Applications accessed via web browsers is called as web application

Technologies used for developing web applications


- Java
- .Net
- Python
- PHP
- Node JS (MEAN)
- Ruby on rails
- HTML/CSS/Javascript
- Cold Fusion

What is the runtime for Web applications?


Web servers are the runtime for running web applications
- Apache (PHP/HTML)
- Nginx (PHP/HTML)
- Apache Tomcat (Java)
- IIS (.NET)
- Weblogic (Java)
- JBoss (Java)
- Sun glassfish (Java)
- Pramati Application Server (Java)
- Websphere (Java)
Is a web server used for deploying java based web applications

Why do we use web servers?


Web servers come with built in features, like
- http/https implementations
- Multi threading capabilities, using thread we can handle multiple requests concurrently
- Application lifecycle management
- Etc..

App servers
Web server features + transaction management + Directory services + EJB containers etc..
- Webshphere
- Weblogic
- JBoss
- etc...

Installing Tomcat on linux machine


- Java is the dependency for tomcat to work
- Installing java
- sudo yum install java-1.8.0-openjdk-devel -y
- cd /opt
- Download tomcat
sudo wget
http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz
- Untar the file
sudo tar -xf apache-tomcat-8.5.20.tar.gz
- Rename the file
sudo mv apache-tomcat-8.5.20 tomcat8
- Change the ownership of tomcat to ec2-user
- sudo chown -R ec2-user:ec2-user tomcat8
- Starting tomcat server

${TOMCAT_HOME}/bin/startup.sh
Note: default port of tomcat is 8080
- Stopping tomcat server
${TOMCAT_HOME}/bin/shutdown.sh
Deploying web application on the tomcat server
Deployment can be done in many ways
1. Place the war file under ${TOMCAT_HOME}/webapps
webapps folder is called as tomcat's deployment directory
2. Upload war file via tomcat manager application

Troubleshooting tomcat specific issues


Troubleshooting is done with help of tomcat log files
${TOMCAT_HOME}/logs

Tomcat manager application


Tomcat manager is the web application, using this we manage applications running on tomcat
By default access is restricted to this application.
- Remove the restriction to manager application
vi /opt/tomcat8/webapps/manager/META-INF/context.xml
Remove the <Value> …….</Value> from this file.
- Add user to access tomcat manager application
vi /opt/tomcat8/conf/tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="javahome" password="javahome" roles="manager-gui,manager-script"/>

You might also like