## web related concepts review
1. Software architecture
1. C / S: client / server
2. B / S: browser / server
2. Resource classification
1. Static resources: after all user access, the result is the same, called static resource static resources can be directly parsed by the browser.
* Such as: HTML, CSS, JavaScript
2. Dynamic resources: Each after the user access to the same resources, the result may be different. Called dynamic resource. After the dynamic resource is accessed, you need to convert a static resource, returning to the browser
* such as: servlet / jsp, php, asp ....
3. The three elements of the communication network
1. IP: an electronic device (computer) in the network a unique identifier.
2. Port: The application uniquely identifies the computer. 0 ~ 65536
3. Transfer Protocol: provides rules for data transmission
1. Basic Agreement:
1. tcp: security protocol, three-way handshake. At a slower pace
2. udp: insecure protocol. high speed
## web server software:
* Servers: server software installed computer
processing request receives the user's request, responds: server software *
* Web server software: receiving a user request to process the request, make a response.
* The web server software, you can deploy web projects, allowing users to access these items through a browser
* web container
* Common java related to web server software:
* webLogic: the Oracle Corporation, a large JavaEE server, supports all the JavaEE specification, for a fee.
* WebSphere: IBM Corporation, a large JavaEE server, supports all the JavaEE specification, for a fee.
* JBOSS: JBOSS company's large JavaEE server, supports all the JavaEE specification, for a fee.
* Tomcat: Apache Fund, small and medium JavaEE server, supports only a small number of JavaEE specification servlet / jsp. Open source, free of charge.
* JavaEE: the sum of the technical specifications of the Java language used in the enterprise development, the specification provides for a total of 13 large
Tomcat * : Web server software
1. Download: HTTP: //tomcat.apache.org/
2. Installation: unzip the archive to.
* Note: The installation directory is recommended not to have Chinese and spaces
3. Uninstall: Delete the directory on the line
4. Start:
* bin / startup.bat, double-click the file to run
* Access: Enter the browser: http: // localhost: 8080 Enter access to your
http: // others ip: 8080 people visited
* possible problems:
1. the black window flashed:
* reason: JAVA_HOME environment variable is not properly configured
* solution: configure JAVA_HOME environment variable
2. Start being given:
1. Violence: find the port number occupied, and find the corresponding process, kill it
* netstat -ano
2. tender: modify its port number
to change the default port number * General will tomcat 80 .80 port number is the default port number for http protocol.
* Benefits: accessing, do not enter the port number
5. Close:
1. Normal Close:
* bin / the shutdown.bat
* Ctrl + C
2. Forced off:
* Click start window ×
6. The configuration:
* deployment projects Method:
1. direct the project into 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
2. Configure the conf / server.xml file
to configure the <Host> tag body
<Context docBase = "D: \ the Hello" path = "/ hehe" />
* docBase: path items stored
* path: Virtual Directory
3. Create a xml file any name in the conf \ Catalina \ localhost. Written in the file
<Context docBase = "D: \ the Hello" />
* Virtual directory: Name of the xml file
* static items and dynamic items:
* directory structure
* directory structure dynamic java project:
- project root directory
- WEB-INF directory:
- the web.xml: Web items core profile
- classes directory: directory to bytecode files
- lib directory: placing dependent jar package
* The Tomcat integrated into IDEA, and create JavaEE project deployment project.