JSP Dynamic Web Development Foundation

Source: Internet
Author: User

1. What is a Dynamic Web page?

An interactive Web page that is designed for use in a program language that is run on the server.

2. What are the advantages of dynamic Web pages?

Interactivity: The Web page dynamically changes and displays content based on the user's requirements and choices.

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

Randomness: This results in different page effects when different people visit the same URL at different times.

3. What is a URL?

A Uniform Resource locator that is used to describe an identity method that describes the addresses of Web pages and other resources on the Internet.

Function: An address identification method that can be defined by the same access method in order for the client program to query different information resources.

The composition of the 4.URL?

(1) Protocol: HTTP protocol, Hypertext Transfer Protocol

(2) Server domain name or IP

(3) Port number

(4) path

5.JSP page composition

(1) Static content

Static text in a JSP page, which is basically HTML text, regardless of the Java and JSP syntax.

(2) JSP directive element

Function: Controls some characteristics of a JSP page while the JSP is running by setting properties in the directive.

"<%" begins, ends with "%>"

Page directive: a directive that is set for the current page

Syntax: <%@ page Property 1 = "Property Value" Property 2 = "Property value 1, property value 2" .... Property N= "Property value"%>

Note: The same property sets multiple attribute values separated by commas.

Common Properties:

Language: Specifies the scripting language used by the JSP page, which defaults to "Java"

Import: This property refers to the class file used in the scripting language.

Contenttye: The character encoding used to specify the MIME type and the JSP page response, which defaults to "Text/html;charset=iso-8859-1".

(3) JSP scripting elements

Little Textbook <%java%>

An expression <%=java a variable or expression%>

Statement <%! %>

Comment: JSP comment <%//single line comment%>, <%/* Multiline Comment */%>

The 6.web container handles three stages of a JSP file:

(1) Translation phase: Translating a well-written JSP file into an identifiable Java source code through a JSP container

(2) Compile stage: Compile Java source files into executable bytecode files

(3) Execution phase: Execute and generate return results page

JSP Dynamic Web Development Foundation

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.