In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you the "sample Analysis of XML and Tomcat", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article "sample Analysis of XML and Tomcat".
Introduction to ML1 and XML: eXtensible Markup Language, extensible markup language.
2. Application: commonly used in three places
(1) used as a format for transferring data between systems
(2) data used to represent relationships in life
(3) configuration files in the system are often used.
3. Grammatical structure
(1) there must be a document declaration in the XML, and the location must be in the first row and first column.
(2) most of the tags of XML are similar to HTML, but XML has only one tag and is case-sensitive.
XML also has a CDATA area writing method that treats the contents of the CDATA area as plain text rather than tags.
4. Parsing method
(1) dom parsing allocates a tree structure in memory according to the hierarchical structure of xml, and then parses the advantages according to the tree structure: the tree structure is convenient to increase the operation of modification and deletion.
Disadvantages: if the file to be parsed is too large, allocate a tree structure in memory at one time, resulting in memory overflow
(2) sax parsing while reading while parsing when using sax to read a specific tag, automatically call the corresponding method to operate the advantage: it will not cause memory overflow
Disadvantages: because it is read while parsing, the operation of adding, modifying and deleting cannot be realized.
(3) the principle of pull parsing is that sax parses and imports two jar packages by creating a parser factory to create a parser, put the files that need to be parsed into the parser, and the effect of forming a tool class can also write the data in the collection (object) to the xml file (serialization).
Tomcat
1, Tomcat introduction:: is the Apache organization, open source free server.
2. Related contents of WEB
(1) dynamic resources: data is changeable; static resources: html+css+js.
(2) cs: client server; bs: browser server.
(3) Communication between web: convert the input domain name into ip address and access it through ip address + port number.
(4) introduction to the server
A hardware: a highly configured computer: software: install server software on the computer
B Common web servers: tomcat server (open source and free); weblogic server; websphere server
3. Tomcat release project
(1) Open project deployment
A webapps the directory in tomcat, and copy the project directly to this directory
B static website: create a folder under the webapps directory of tomcat, which can be accessed in the browser's address bar
For example: http://127.0.0.1: port number / name of the folder created / name of the 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 the conf directory of tomcat, configure the virtual path, and write it in the Host tag
B find the conf of tomcat, then continue to find the\ Catalina\ localhost folder, create a file in xml format in this folder, and configure the virtual path
(3) integrate tomcat with myeclipse
A the process of integrating tomcat in myeclipse
B start the tomcat server and shut down the tomcat server in myeclipse
C publish the project to tomcat in myeclipse
D remove items from tomcat in myeclipse
HTTP protocol
1. Introduction: the data format followed by the request and response
2. Features: operations based on request and response (first request, 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 to the browser page according to the request sent. This process is called response.
The above is all the content of this article "sample Analysis of XML and Tomcat". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.