4.1 View the list of web applications
Now let's see what web applications are installed in Tomcat by default. There are usually several of them, and the most important one for you is the Application Manager. To open it, click on the Manager App button or follow the link .
Next, you will need to log in under the user that we saw at the settings step:
If everything went well, you will see a list of installed web applications:
The left column specifies the path where the application opens. In the rightmost column, you will see commands for managing the web application: Start, Stop, Reload, Undeploy.
4.2 Deploy a test web application
Let's upload our own web application to the Tomcat web server.
It's good that GitHub just has a special demo application for this case. Download it from the link .
Then open the Manager App page in Tomcat http://localhost:8080/manager and scroll down to the Deploy section.
In it you need to specify the path to your web application (all applications have unique paths), as well as the war file of your web application. Then click the Deploy button.
If everything went well, you will see the new application in the list of web applications:
You can verify that it works by following the link: http://localhost:8080/demo
4.3 Port change
If you don't like that your webserver responds to url localhost:8080/
, and you want it to open just to url localhost/
, then you need to change Tomcat's port to default: to 80
instead of 8080
.
To do this, open the server.xml file in the conf folder .
Find the "Connector" tag where port is 8080
and change it to port 80
:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
You can also change the HTTPS port from 8443
to just 443
.
GO TO FULL VERSION