官术网_书友最值得收藏!

Installing a web server

So far, we have seen how to install JDK and Maven. Using these tools, we can compile the Java source code into the .class files and package these .class files into the .jar or .war archives. However, how do we run our packaged archives? For this, we take the help of a web server, which will host our packaged archives as a running application.

Time for action - installing the Tomcat web server

Apache Tomcat is a popular Java web server and servlet container. We are going to use Apache Tomcat Version 8.0, which is the latest, but you can even use version 7.0. Let's take a look at how we can install the Tomcat web server:

  1. Go to the Apache Tomcat home page at http://tomcat.apache.org/.
  2. Click on the Tomcat 8.0 download link; it will take you to the download page.
  3. Click on the 32-bit/64-bit Windows Service Installer (pgp, md5, sha1) link; it will start downloading the installer.
  4. Once the download is finished, go to the downloaded directory and double-click on the installer; this will open up a wizard window.
  5. Just click through the Next buttons in the wizard, leaving the default options alone, and click on the Finish button at the end of the wizard. Note that before clicking on the Finish button, just ensure that you have unchecked Run Apache Tomcat checkbox.

Installing Apache Tomcat with the default option works successfully only if you have installed Java in the default location. Otherwise, you have to correctly provide the JRE path according to the location of your Java installation during the installation of Tomcat, as shown in the following screenshot:

The Java runtime selection for the Tomcat installation

主站蜘蛛池模板: 兴义市| 延吉市| 漳州市| 武陟县| 阳城县| 若尔盖县| 紫阳县| 晋江市| 建宁县| 抚顺市| 石景山区| 醴陵市| 同心县| 高陵县| 洛隆县| 岳普湖县| 泗水县| 张家口市| 宜都市| 贡觉县| 禄丰县| 东明县| 临洮县| 荥经县| 汉阴县| 新安县| 乐昌市| 瑞金市| 中宁县| 蓬安县| 驻马店市| 新野县| 宿迁市| 竹北市| 扶沟县| 漯河市| 黎城县| 金阳县| 石首市| 化隆| 宁明县|