This section covers the fundamental concepts and steps to get started with Apache Tomcat. Learn how to set up, configure, and deploy web applications.
- Open the terminal and navigate to the
bindirectory of your Tomcat installation. - Run the startup script:
- Windows:
startup.bat - Linux/Mac:
./startup.sh
- Windows:
- Navigate to the
bindirectory. - Run the shutdown script:
- Windows:
shutdown.bat - Linux/Mac:
./shutdown.sh
- Windows:
- Open the
server.xmlfile located in theconfdirectory. - Locate the
<Connector>element and change theportattribute:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />- Deploy a Pre-Built
.warFile - Download a sample
.warfile- Download the sample application Sample Web Application at https://tomcat.apache.org/tomcat-10.1-doc/appdev/sample/
- Deploy to Tomcat
- Copy the
.warfile into the webapps directory of your Tomcat installation. - Access the Application: Open a browser and navigate to http://localhost:8080/sample.
- Copy the