JavaWeb study notes

Starting today to learn java to write notes Come learn then he found he did not remember. . . . . Or write the blog now, hai, found himself still is a white.

This is mainly some of the problems some of the concepts and download and install the web server and tomcat appear

Web-related concepts Review

1. Software Architecture
C / S: Client / server
B / S: browser / server

2. Resource classification
static resource: the results of all user access, get is the same, as a static resource static resources can be directly parsed by the browser, such as: html, css, JavaScript, jQuery
dynamic resource: each user access to the same resources after , the result may be different. Called dynamic resource. After the dynamic resource being accessed, you need to convert a static resource, and then returned to the browser
such as: servlet / jsp, php, asp

3. The three elements of the communication network
IP: an electronic device (computer) that uniquely identifies the network
port: application unique identifier in the computer. 0-65536
Transfer Protocol: provides rules for data transmission
* Base Protocol:
TCP protocol: security protocol, three-way handshake, at a slower pace
UDP protocol: insecure protocol, fast

Web server software

Server: Server software installed computer
server software: accepting user requests, processing the request, respond to
Web server software: accepting user requests, processing the request, respond in the web server software, you can deploy web projects, allowing users to browser to access these web container projects

Common java related to web server software:
* WebLogic: the Oracle Corporation, a large Java EE server, supports all java specifications and costs
* webSphere: IBM Corporation, a large Java EE server, supports all java specifications and costs
* JBoss: JBoss the company's large-scale java EE server, supports all java specifications and costs
* tomcat: apache Fund, small and medium JavaEE server, supports only a small number of JavaEE specification servlet / jsp. Open source, free of charge.

JavaEE: technical specifications and the sum of the java enterprise-level language used in the enterprise software development

Tomcat server
1. Download: http://tomcat.apache.org/
2. Installation: unzip the installation package can be (Note: The installation directory is recommended not to have Chinese and spaces)
3. Uninstall: Direct can be deleted
4. Start : bin / startup.bat, double-click the file to
access: the browser input: // localhost: 8080 (127.0.0.1:8080) or: ip + port number of the
problems you might encounter
1. black flash across the window
* reason : JAVA_HOME variable is not properly configured
* solution: configure JAVA_HOME variable
2. start an error and solutions
violence: find the port number occupied, and find the corresponding process, kill it (netstat -ano)
tender: modify the port itself number (the default port is typically 80,80 to http does not need to modify the input port number) the conf / the server.xml
5. the off:
1. normal Close: click: bin / shutdown.bat files, C +, or the Ctrl
2 forced Off: click on the window of the X-
6. configure deployment project of ways:
1. direct the project can be put into the webapps directory
2. configure the conf / server.xml file
configuration tab

* docBase: path items stored
* path :virtical list

3. In the conf, Catalina \ licahost create xml file any name. Written in the file

* docBase: path items stored in
the name of xml file: * Virtual Directory

* Static and dynamic project items:
* directory structure
* directory structure dynamic java project:
- project root
-web-INF directory
-web.xml: web project's core configuration file
-class directory: bytecode file storage directory
-lib catalog: Place dependent jar files
Here Insert Picture Description

The tomcat concentrated IDEA, and the creation JavaEE project, the deployment project

Released four original articles · won praise 1 · views 139

Guess you like

Origin blog.csdn.net/weixin_44057060/article/details/104397384