Home Backend Development XML/RSS Tutorial Detailed introduction to introductory knowledge of XML and Tomcat

Detailed introduction to introductory knowledge of XML and Tomcat

Mar 18, 2017 pm 05:20 PM

Introduction to

ML1, XML: eXtensible Markup Language, extensible markup language.

2. Application: Commonly used in three places

(1) Used as a format for transmitting data between systems

(2) Used to express relationships in life The data

(3) is often used in the system’s configuration file

3, syntax structure

(1) There must be a document declaration in XML, The position must be in the first row and first column

(2) Most XML tags are similar to HTML, but XML has only one tag and is case-sensitive

XML also has a CDATA area Writing method Treat the content in the CDATA area as ordinary text content instead of tags.

4. Parsing method

(1)dom parsing Allocate a tree structure in the memory according to the hierarchical structure of xml, and then parse it according to the tree structure. Advantages: The tree structure facilitates the operation of adding, modifying and deleting.

Disadvantages: If the file to be parsed is too large, a tree structure will be allocated in the memory at one time, causing memory overflow.

(2) Sax analysis: parse while reading when using sax method When a specific tag is read, the corresponding method is automatically called for operation. Advantages: It will not cause memory overflow.

(3) The principle of pull parsing is that sax parsing imports two jar packages, creates a parser by creating a parser factory, and puts the files that need to be parsed into the parser to form a tool class effect. It can also be used as a collection (

Object

) The data inside is written to the xml file (serialization)Tomcat

1. Introduction to Tomcat: It is an open source free server organized by Apache.

2. WEB related content

(1) Dynamic resources: data changes;

Static

Resources: html+css+js. (2) cs: client server; bs: browser server.

(3) Communication between webs: Convert the entered domain name into an IP address, and access it through the IP address + port number

(4) Server Introduction

a Hardware: A computer with high configuration: Software: Install server software on the computer

b Common web server: tomcat server (open source and free );weblogic server;websphere server

3. Tomcat release project

(1)Open project deployment

a In the webapps directory in tomcat, copy the project directly to this Below the directory

b Static website: Create a folder in tomcat's webapps directory, and you can access this file in the address bar of the browser

For example: http://127.0.0.1: Port number/name of created folder/name of file

c Dynamic website: If you want to run a dynamic website in tomcat, you must follow a certain

directory structure

(2) Configure virtual path

a Find server.xml in tomcat's conf directory, configure the virtual path, and write it in the Host tag

b Find tomcat's conf, continue searching below \Catalina\localhost folder, create an xml format file in this folder, and configure the virtual path

(3) Use myeclipse to integrate tomcat

a Integrate tomcat in myeclipse Process

b Start tomcat server and shut down tomcat server in myeclipse

c Publish the project to tomcat in myeclipse

d Remove the project from tomcat in myeclipse

HTTP protocol

1. Introduction: The data format followed by requests and responses

2. Features: Operations based on requests and responses (request first, then response), Based on tcp protocol, port 80

3. Request and response

(1) Request: Enter an address in the address bar of the browser and click Enter. This process is a request

(2) Response: The server returns the data and displays it on the browser page according to the request sent. This process is called response

The above is the detailed content of Detailed introduction to introductory knowledge of XML and Tomcat. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to deploy multiple projects in tomcat How to deploy multiple projects in tomcat Apr 21, 2024 am 09:33 AM

To deploy multiple projects through Tomcat, you need to create a webapp directory for each project and then: Automatic deployment: Place the webapp directory in Tomcat's webapps directory. Manual deployment: Manually deploy the project in Tomcat's manager application. Once the project is deployed, it can be accessed by its deployment name, for example: http://localhost:8080/project1.

How to check the number of concurrent connections in tomcat How to check the number of concurrent connections in tomcat Apr 21, 2024 am 08:12 AM

How to check the number of concurrent Tomcat connections: Visit the Tomcat Manager page (http://localhost:8080/manager/html) and enter your user name and password. Click Status->Sessions in the left navigation bar to see the number of concurrent connections at the top of the page.

Where is the root directory of the tomcat website? Where is the root directory of the tomcat website? Apr 21, 2024 am 09:27 AM

The Tomcat website root directory is located in Tomcat's webapps subdirectory and is used to store web application files, static resources, and the WEB-INF directory; it can be found by looking for the docBase attribute in the Tomcat configuration file.

How to check the port number of tomcat How to check the port number of tomcat Apr 21, 2024 am 08:00 AM

The Tomcat port number can be viewed by checking the port attribute of the <Connector> element in the server.xml file. Visit the Tomcat management interface (http://localhost:8080/manager/html) and view the "Status" tab. Run "catalina.sh version" from the command line and look at the "Port:" line.

How to run two projects with different port numbers in tomcat How to run two projects with different port numbers in tomcat Apr 21, 2024 am 09:00 AM

Running projects with different port numbers on the Tomcat server requires the following steps: Modify the server.xml file and add a Connector element to define the port number. Add a Context element to define the application associated with the port number. Create a WAR file and deploy it to the corresponding directory (webapps or webapps/ROOT). Restart Tomcat to apply changes.

How to run html and jsp on tomcat How to run html and jsp on tomcat Apr 21, 2024 am 09:04 AM

Tomcat can run HTML and JSP. The method is as follows: copy the HTML file to the corresponding subdirectory of the Tomcat directory and access it in the browser. Copy the JSP file to the corresponding subdirectory of the Tomcat directory, and use the <%@ page %> directive to specify the Java code and access it in the browser.

How to configure domain name in tomcat How to configure domain name in tomcat Apr 21, 2024 am 09:52 AM

To configure Tomcat to use a domain name, follow these steps: Create a server.xml backup. Open server.xml and add the Host element, replacing example.com with your domain name. Create an SSL certificate for the domain name (if required). Add an SSL connector in server.xml, change the port, keystore file, and password. Save server.xml. Restart Tomcat.

Reasons for garbled characters in tomcat Reasons for garbled characters in tomcat Apr 21, 2024 am 10:18 AM

Reasons for Tomcat garbled characters: 1. Character set mismatch; 2. HTTP response header is not set correctly; 3. Filter or encoder configuration error; 4. Web page encoding is incorrect; 5. Other reasons (including server-side language, database encoding and proxy server issues).

See all articles