Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tomcat server browser requested page returned page displayed Request-Response Cycle C: ---- /webapps/ROOT/chapter01/sample00.htm.

Similar presentations


Presentation on theme: "Tomcat server browser requested page returned page displayed Request-Response Cycle C: ---- /webapps/ROOT/chapter01/sample00.htm."— Presentation transcript:

1 Tomcat server http://localhost:8080/chapter01/sample00.html browser requested page returned page displayed Request-Response Cycle C: ---- /webapps/ROOT/chapter01/sample00.htm Local address

2 Tomcat server http://localhost:8080/myapp/chapter01/sample00.html browser requested page returned page displayed Request-Response Cycle C:myjspapp/chapter01/sample00.htm Local feedback Loop address

3 Tomcat Server Start Server Requesthttp://:8080/localhost/chapter01/sample00.htmlmyapp protocol is http Server is local Listens on port 8080 Context Path to file defined in Tomcat configuration file

4 To Start Server Start menu > or use: Tomcat-start-shortcut - on desktop or go to: C:\Program Files\Apache Tomcat 4.0\bin and double-click startup.bat Program Files >Apache Tomcat 4.0

5 help system find things – like Java compiler Configuration file Tomcat Installation Environment variables helps Tomcat find things and handle file extensions properly, etc

6 Make sure: Java is installed. Java version numbers in environment variables match your Java version (like 1.4.0) Tomcat Installation Environment variables are defined right. - even if they differ from Xue Bai

7 Don't skip steps in Xue Bai directions - read precisely – read all pages. Precautions: Path variable - copy it to NotePad (and print) before changing it. ClassPath variable - add new/edit per Xue Bai Context path - add new entry to Tomcat configuration file per Xue Bai Tomcat Installation - include "current directory" in ClassPath.; – dot followed by semi-colon. - Edit in NotePad copy & check carefully –paste carefully

8 Control panel > System > Advanced > System variables Double-click variable name to edit. Environment variables They tell the system where to find things

9 semi-colon ! -- no spaces JAVA_HOME - add new variable with value: Path - edit it to include because that's where my Java is located. ClassPath - add New/edit variable - see Xue Bai Environment Variables --------c:\j2sdk1.4.0\bin ; -------- - include "current directory" in ClassPath.; – dot followed by semi-colon. c:\j2sdk1.4.0\ yep!

10 TextPad or: Start menu > programs > Apache >Configuration > edit - Tells Apache where to find things. Configuration file C:\Program Files\Apache Tomcat 4.0\conf"server.xml" <Context path="/myapp" docBase="c:\myjspapp" debug="0" privileged="true"/> Right after: <!-- --> Insert: Pick a nameServer looks for files here Request:http://:8080/localhost/chapter01/sample00.htmlmyapp Server Looks in:c:/myjspapp/chapter01/sample00.html

11 Store your files in: c:/myjspapp/chapter01/ If don't add myapp to configuration file (alternatively): Store your files in: C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\chapter01 Request:http://:8080/localhost/chapter01/sample00.htmlmyapp Request:http://:8080/localhostchapter01/sample00.html Server looks here no myapp or anything else Server looks in c:/myjspapp If add myapp to configuration:


Download ppt "Tomcat server browser requested page returned page displayed Request-Response Cycle C: ---- /webapps/ROOT/chapter01/sample00.htm."

Similar presentations


Ads by Google