Java 17 Recipes
Download 3.2 Mb. Pdf ko'rish
|
Java 17 Recipes
startup.bat. A second window is generated with the log of our applications.
To check that Tomcat is working properly, open a browser and type localhost:8080. You should see the page shown in Figure 13-1 . Figure 13-1. The localhost home page Chapter 13 Java Web appliCations 482 How It Works The following steps show what happens when you request your browser to view a web page (e.g., http://localhost:8080/) on your browser. 1. When you type an address such as www.website.com into the address field, your browser resolves into the corresponding Internet Protocol (IP) address, usually by asking the Domain Name System provided by your Internet Service Provider (ISP). Then your browser sends an HTTP (HyperText Transfer Protocol) request to the newly found IP address to receive the content required. 2. In reply, the web server sends an HTTP response containing a plain-text HTML (HyperText Markup Language) page. Images and other non-textual components, such as sound and video clips, only appear on the page as hyperlinks to those resources stored either on the same server or another server on the internet. The browser receives the response, interprets the HTML code contained in the page, requests the non-textual components from the server, and displays it to your screen. A URL like http://localhost:8080/ specifies that on the host side, the port number for HTTP is 8080 instead of 80, which is the standard port for HTTP. This is because Tomcat expects and routes HTTP traffic through port 8080. This is appropriate if you intend to use Tomcat to handle requests for HTML/JSP pages and place it behind a server (typically, the Apache web server) that handles static HTTP/HTTPS. But if you intend to use Tomcat to handle HTTP/HTTPS, you should change its default ports 8080 and 8443 to 80 and 443, respectively. Chapter 13 Java Web appliCations |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling