1 / 10

Tomcat server

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

alyssa
Download Presentation

Tomcat server

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. Request-Response Cycle C:myjspapp/chapter01/sample00.htm Local feedback Loop address http://localhost:8080/myapp/chapter01/sample00.html Tomcat server browser requested page returned page displayed

  2. Tomcat Server Start Server Request http:// localhost :8080/ myapp /chapter01/sample00.html protocol is http Server is local Path to file Listens on port 8080 Context defined in Tomcat configuration file

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

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

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

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

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

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

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

  10. Request: Request: http:// http:// localhost localhost :8080/ :8080/ myapp /chapter01/sample00.html Server looks in c:/myjspapp If add myapp to configuration: 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 chapter01/sample00.html no myapp or anything else Server looks here

More Related