web server software:
: The server computer server software installed
Server Software: receiving a user's request, processes the request, responds
web server software: receiving a user's request, process the request, responds.
In the web server software, you can deploy web projects, allowing users to access these items through a browser
web container
Tomcat: web server software
- Download: http://tomcat.apache.org/
- Installation: extract the archive to
- Uninstall: Delete the directory on the line
- start up:
- bin / startup.bat, double-click the file to run
Access: Enter the browser: http: // localhost: 8080 Enter access to your
http: // others ip: 8080 visit others- Possible problems encountered:
- Black window flashed:
- The reason: the JAVA_HOME environment variable is not configured correctly
- Solution: Configure JAVA_HOME environment variable
- Start being given:
- Violence: find the port number occupied, and find the corresponding process, kill it
- netstat -ano
- Gentle: modify its port number
- conf/server.xml
-
- The default port number of the general will is 80.80 tomcat port number is the default port number for http protocol.
- Benefits: When you visit, do not enter the port number
- Violence: find the port number occupied, and find the corresponding process, kill it
- Black window flashed:
- shut down:
- Normally closed:
- bin/shutdown.bat
- ctrl+c
- Forced off:
- Click Start window ×
- Normally closed:
- Configuration:
- Deployment of the project:
- The project can be put directly under the webapps directory.
- / Hello: access path of the project -> Virtual Directory
- Simplify deployment: the project package labeled as a war, then war pack is placed under the webapps directory.
- war package will automatically unzip
- Configuration conf / server.xml file (generally do not have this, because this is a core document)
inTag body configuration
<Context docBase = "D: \ hello" path = "/ hehe" />- docBase: items stored path
- path: Virtual Directory
- In conf \ Catalina \ localhost create xml file any name. Written in the file
<Context docBase = "D: \ hello" />- Xml file name: Virtual Directory
- The project can be put directly under the webapps directory.
- Static items and dynamic items:
- Directory Structure
- java directory structure in a dynamic entry:
- the project root
- WEB-INF directory:
- the web.xml: Web items core profile
- Catalog classes: directory to bytecode files
- lib directory: placing dependent jar package
- java directory structure in a dynamic entry:
- Directory Structure
- Deployment of the project: