Dynamic Web Development Basics

Source: Internet
Author: User

What is a Dynamic Web page?

Myth: Beginners generally think that dynamic Web pages are moving pages, which is actually not the case.

Dynamic Web pages: refers to interactive Web pages that are designed on the server side, using programming languages that

Depending on the condition, different page content is returned.

Advantages of Dynamic Web pages:

1. Interactivity: Web pages dynamically change and display content based on user requirements and choices

2. Automatic Update: That is, without changing the page code, will automatically generate new page content, can save effort

3. Randomness: When different people visit the same URL, different page effects will occur

Why learn b/s architecture technology?

  Before learning b/s architecture, first understand the C/s (client/server, client/server-side) architecture of the system, which is divided into

Client and server two tiers, the user installs the client software locally, communicates with each other through the network and the server side

If there are 500 student machines in a central LAN, a software based on C/S architecture will be installed on these computers.

Then the system maintainers have to install the software on each of the 500 student machines, and this software makes even minor changes,

System maintainers are required to update the software on each of the 500 students, so that the system maintenance workload will be large

Deployment structure:

    

So, is there a software architecture that allows a wider range of users to access the application system after the application is deployed, and can effectively

To reduce the daily maintenance workload of the system maintainer? The answer is b/s structure, the structure is as follows

   

What is JSP

JSP (JavaServer pages) is a dynamic Web technology standard developed by Sun Microsystems, a company that many companies are involved in. JSP technology is a bit like ASP technology, it is in the traditional Web page HTML file (*.htm,*.html) inserted Java program segment (scriptlet) and JSP tag (tag), thereby forming a JSP file (*.jsp).

When a Web server encounters a request to access a JSP Web page, it executes the program segment first, and then returns the execution result along with the HTML code in the JSP file to the customer. Inserted Java program segments can manipulate databases, redirect Web pages, and more to achieve the functionality needed to build dynamic Web pages.

JSP, like the Java servlet, is executed on the server side, usually returning the client is an HTML text, so the client can browse as long as there is a browser.

The constituent elements of a JSP

JSP annotations
<%--*****--%> is an annotation that does not output to the client.
<%!--*****--%> is an annotation that is output to the client.
instruction Element
<%@ page contenttype= "text/html"%> setting the content type of the specified pages
<%@ include ...%> introduces a file in the translation phase
<%@ taglib ...%> declares a tag library for a page to use that contains custom behavior.
Behavioral elements
<jsp:useBean> make a JavaBeans component available on this page
<jsp:setProperty> Set the JavaBeans property value
<jsp:forward> transfers the processing of the request to a servlet or JSP page
Script elements
<%this is a scriptlet%> embed script code
An expression element
<%= this was an expression%> embedded Java expression
Method declaration
<%! This is a declaration%> used to declare variables and methods in the implementation class of a JSP page

Dynamic Web Development Basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.