1 / 23

Installing and Configuring Web Server - Chapter 1 Server Setup and Configuration

Step-by-step instructions on installing and configuring a web server, including installing Java, Tomcat, and testing the installation.

maynardl
Download Presentation

Installing and Configuring Web Server - Chapter 1 Server Setup and Configuration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1 Server Setup and Configuration

  2. Contents • Installing and Configuring Web Server • Testing the Installation

  3. A. Installing and Configuring Web Server • Installing Java • Installing Tomcat Web Server • Configuring Tomcat

  4. 1. Installing Java • Download JDK 6 Update 6 (jdk-6u6-windows-i586-p.exe)athttp://java.sun.com/javase/downloads/index.jsp and run it

  5. 2. Installing Tomcat Web Server • Download apache-tomcat-6.0.16.exe at http://tomcat.apache.org and run it • Destination folder:C:\Program Files\Apache Software Foundation\Tomcat 6.0 (TOMCAT_DIR)

  6. 3. Configuring Tomcat • Configuration file: TOMCAT_DIR/conf/server.xml 3.1. Specifying Server Port 3.2. Enabling Servlet Reloading

  7. Change to 80 3.1. Specifying Server Port • Change port from 8080 to 80

  8. 3.2. Enabling Servlet Reloading Add DefaultContext:

  9. B. Testing the Installation 1. Starting Tomcat 2. Testing HTML 3. Testing JSP 4. Testing Servlet

  10. 1. Starting Tomcat • Start > All Programs > Apache Tomcat 6.0 > Monitor Tomcat • Right-click the Tomcat icon at the lower right corner of the screen > Start service

  11. 2. Testing HTML 2.1. Preparing Hello.html 2.2. Running Hello.html in Web Browser

  12. 2.1. Preparing Hello.html • Use Microsoft FrontPage or Dreamweaver 8 to edit and save Hello.html to TOMCAT_DIR/webapps/ROOT

  13. 2.2. Running Hello.html in Web Browser

  14. 3. Testing JSP 3.1. Preparing Hello.jsp File 3.2. Running Hello.jsp in Web Browser

  15. 3.1. Preparing Hello.jsp File • Use Microsoft FrontPage or Dreamweaver 8 to edit and save Hello.jsp to TOMCAT_DIR/webapps/ROOT

  16. 3.2. Running Hello.jsp in Web Browser

  17. 4. Testing Servlet 4.1. Preparing HelloServlet 4.2. Declaring HelloServlet in web.xml 4.3. Running HelloServlet in Web Browser

  18. 4.1. Preparing HelloServlet.java • Use Eclipse 3.2 to edit HelloServlet.java (see next slide) • Import TOMCAT_DIR/lib/servlet-api.jar to the Eclipse project • Save HelloServlet.class to TOMCAT_DIR/webapps/ROOT/WEB-INF/classes

  19. 4.2. Declaring HelloServlet in web.xml • Using WordPad or Dreamweaver to add the following to TOMCAT_DIR/webapps/ROOT/WEB-INF/web.xml

  20. 4.3. Running HelloServlet in Web Browser

  21. References • Core Servlets And Java Server Pages, Volume 1, 2nd Edition, Chapter 02.

  22. Revision History

More Related