Java Reference
In-Depth Information
root folder (C:\Program Files\Apache Software Foundation\Tomcat 5.5\
webapps\ROOT) and the class files are placed in the default WEB-INF\
classes folder (C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\ROOT\WEB-INF\classes). You may need to create the folder,
classes, in the default WEB-INF folder if it does not already exist.
To begin using the WebStocks Web application, users request the initial log
on Web page by entering the appropriate URL in the address text box of their
browser. If a specific Web page is not listed for the URL, the default Web page for
the Web site is displayed, typically index.html. The initial Web page then invokes
the servlet when its form is submitted.
Because the local machine is acting as the server, the URL entered in the
browser address text box is different than the typical address. For this application,
the complete address to the initial Web page is http://localhost:8080/index.html.
The keyword, localhost , specifies the local system. Because the local machine is
the server, localhost is used in place of a host address beginning with www. By
default, Tomcat accepts requests on port 8080. A port is a logical connection
address on the server for a particular application. This is listed after the host
address, separated by a colon. Because the initial Web page is located in the root
folder of the server, the path is /. This is followed by the Web page file name,
index.html, which also is the default page name.
The following steps start the WebStocks Web application.
To Start the Webstocks Web Application
1. Verify that the Data Disk is in drive A.
2. If necessary, create the default servlet folder, classes, in the WEB-INF
folder, to create the folder located at C:\Program Files\
Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-
INF\classes. Copy the files as listed in Table 12-2 on page 785 and the
WebStocks.class file you created in the Chapter12 folder on the Data
Disk to the default servlet folder or a location specified by your
instructor.
3. Copy the files as listed in Table 12-3 on page 785 in the Chapter12
folder on the Data Disk, including the HTML and JSP files you created,
to the default root folder. Also copy the two image files, tickerScrn.wmf
and stockListing.jpg, as these are used for the initial Web page.
4. Start Tomcat using the Apache Service Manager located in the system
tray. If you do not have the Apache Service Manager icon displayed in
your system tray, see Appendix B to start the application, and then use it
to start the Tomcat Service.
(continued)
Search WWH ::




Custom Search