First note

Features of static web pages and dynamic web pages.

Static webpages:
(1) Static webpages cannot be simply understood as static webpages. It mainly refers to the fact that there is no program code in the webpage, only HTML (ie: Hypertext Markup Language), and the general suffixes are .html, .htm, Or .xml etc. Although the content of a static web page will not change once it is created . However, static web pages also include some active parts, which are mainly GIF animations, etc.

(2) To open a static web page, the user can directly double-click, and the content of the page opened by anyone at any time remains unchanged.

Dynamic webpages:
(1) Dynamic webpages refer to a webpage programming technology as opposed to static webpages. In addition to HTML tags, the webpage files of dynamic webpages also include program codes for some specific functions . These codes can enable the browser and the server to interact, so the server side dynamically generates webpage content according to different requests from clients.

That is: Compared with static web pages, dynamic web pages have the same page code, but the displayed content can change with time, environment, or the result of database operations.

(2) Dynamic webpages are not directly related to visual dynamic effects such as various animations and rolling subtitles on the webpage. Dynamic webpages can also be pure text content or content containing various animations. These are only specific webpages. The presentation form of the content, regardless of whether the web page has a dynamic effect, as long as it is a web page generated using dynamic website technology (such as PHP, ASP, JSP, etc.) can be called a dynamic web page.

Quote

Architecture

1.
Insert picture description here
CS architecture: Advantages of Client Server CS architecture:
1. The interface and operation of C/S architecture can be very rich.
2. Security performance can be easily guaranteed, and it is not difficult to achieve multi-layer authentication.
3. Since there is only one layer of interaction, the response speed is faster.

Disadvantages of C/S architecture:
1. It has a narrow application area and is usually used in local area networks.
2. The user group is fixed, because the program needs to be installed before it can be used, so it is not suitable for some unknown users.
3. The maintenance cost is high, and if an upgrade occurs, all client programs need to be changed.

2. BS architecture:
Insert picture description here
The advantages of the Broswer Server B/S architecture:
1. The client does not need to be installed, just a web browser.
2. The BS architecture can be directly placed on the WAN, and the purpose of multi-client access can be achieved through certain authority control, with strong interactivity.
3. The BS architecture does not need to upgrade multiple clients, just upgrade the server.

Disadvantages of B/S architecture:
1. On cross-browser, the BS architecture is not satisfactory.
2. It takes a lot of effort to achieve the CS program performance.
3. Huge design costs are required in terms of speed and safety. This is the biggest problem of the BS architecture.
4. The interaction between the client and the server is a request-response model, and the page usually needs to be refreshed, which is not what the client wants to see.

Quote

tomcat installation

tomcat download

The directory description after tomcat decompression:
bin: executable file.
conf: configuration file.
lib: the jar file that tomcat depends on.
log: log file.
temp: Temporary files.
webapps: executable projects (the projects we develop are stored in this directory).
work: store the java translated by jsp and the edited class file (jsp->java->class).

tomcat operation

Start startup, enter localhost:8080 in the browser (8080 is the default, if you modify 8080 in the server.xml under the conf folder, you need to enter the port value you changed), and then the page will change to enter apache page (this default page is in the ROOT folder), you can also specify the page to open the corresponding folder, you need to enter the localhost:8080/corresponding folder in the browser.

Make your own project: you need to create a new myproject folder under webapps, and you must put the web-xml file and classes folder (storing bytecode files) and lib folder (storing java packages) in the WEB-INF folder. You also need to create a new index.jsp file under the project. The code stored in this file is the content displayed on the page.
Insert picture description here

Problems encountered when tomcat is running

  • When running the startup.bat file under bin, a crash occurs.
    My solution:
    add the specific location of your own JAVA_HOME and JAR_HOME in front of setclasspath.bat.
    Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45715461/article/details/113686512