JavaWeb study notes 20/10/9

JavaWeb

1.1 Basic concepts:

  • Static Web: html, css, etc., web content with constant data provided to everyone
  • Dynamic Web: almost all websites such as Taobao. Different people see different messages at different times and places

In Java, the technology of dynamic web resource development is collectively referred to as JavaWeb;


1. 2 Web application

Web applications refer to programs that can provide browser access

  • a.html, b.html …multiple web resources, these web resources can be accessed by the outside world and provide services to the outside world

  • URL

  • This unified web resource will be placed in the same folder, web application -> Tomcat: server

  • A web application consists of multiple parts (static web, dynamic web)

    • html, CSS. js
    • jsp, servlet
    • Java program
    • jar包
    • Configuration file (Properties)

    After the web application is written, if you want to provide access to the outside world, you need a server for unified management;

1. 3 Static Web

*.htm, *.html, these are the suffixes of the webpage, if these things always exist on the server, they can be read directly.

  • Disadvantages of static web
    • The web page cannot be dynamically updated, all users see is an interface
      • Carousel picture, click special effect: pseudo-motion effect
      • JavaScript [most used in actual development]
      • VBScript
    • Cannot interact with the database, data cannot be persisted, and users cannot interact

1. 4 Dynamic Web

The page will be displayed dynamically, and the effect of web page display varies from person to person
Insert picture description here

Disadvantages:

  • If there is an error in the dynamic web resource of the server, its background program needs to be rewritten and republished (downtime for maintenance)

advantage

  • Web pages can be dynamically updated, all users see different pages
  • It can interact with the database (data persistence: registration, product information, user information, etc.)

2.1 Technical explanation

ASP

  • Developed by Microsoft, the earliest popular in China
  • Embed VB script in HTML, ASP + COM
  • In ASP development, basically an interface has thousands of lines of business code, the interface is chaotic, and the maintenance cost is high
  • C#
  • IIS
<h1>
    <h1><h1>
        <h1>
            <h1>
                <h1>
        <h1>
            <%
            System.out.println("Hello")
            %>
            </h1>
        		</h1>
     </h1></h1>
</h1>

PHP

  • Fast development speed, powerful function, cross-platform, simple code (70%, WP)
  • Unable to carry a large number of visits (limitations)

JSP/Servlet

B/S: browser and server

C/S: client and server

  • Sun's main B/S architecture
  • Based on Java language
  • Can bear the impact of the three high (high concurrency, high availability, high performance) problems
  • Syntax like ASP, convenient for conversion

2. 2 Web server

The server is a passive operation, used to process some user requests and give the user some response information

ISS

Developed by Microsoft, built in ASP...WINDOWS

Tomcat

Tomcat is a core project in the Jakarta project of the Apache Software Foundation, which is jointly developed by Apache , Sun, and other companies and individuals. Thanks to Sun's participation and support, the latest Servlet and JSP specifications can always be reflected in Tomcat. Tomcat has advanced technology, stable performance, and is free of charge, so it is loved by Java enthusiasts and recognized by some software developers. It has become a popular Web application server.

Tomcat server is a free and open-source Web application server, which is a lightweight application server . It is commonly used in small and medium-sized systems and where there are not many concurrent users. It is the first choice for developing and debugging JSP programs. It is the best choice for a Java beginner to learn the Web

Tomcat actually runs JSP pages and servlets. Like Web servers such as IIS , it has the function of processing HTML pages. In addition, it is also a Servlet and JSP container. The independent Servlet container is the default mode of Tomcat. The ability to handle static HTML is not as good as the Apache server. Currently the latest version of Tomcat is 9.0.37

Guess you like

Origin blog.csdn.net/qq_44685947/article/details/108986947