Jsp tags, Fields

Source: Internet
Author: User

 

1. Jsp labels are the logical business functions provided, so you can avoid writing java code in jsp. The main labels are

<Jsp: include page = ""> </jsp: include> Other jsp files can be included in double quotation marks.

<Jsp: foward page = ""> </jsp: iorward> jump to the tab jump page. You can directly add

<Jsp: parma value = "" name = ""> </jsp: prma> You can directly add a value to the double quotation marks for the value transfer tag, which must be used with the foward tag.

2. What is the difference between dynamic and static introduction?

<Jsp: include> when two jsp files are involved in the dynamic label introduction, the files are translated into two servlets and merged for execution.

Include is the two jsp files involved in the static import and will be translated into a servlet. The two files are merged in the source file for execution.

3. jsp ing jsp

Jsp ing jsp is to introduce html files in jsp. The ing syntax is

<Servlet>

<Servlet-name> *** </servlet-name>

<Jsp-file> *** </jsp-file>

<Load-on-startup> *** </load-on-startup>

</Servlet>

<Servlet-mapping>

<Servlet-name> *** </servlet-name>

<Url-pattern> *****. html </url-pattern>

</Servlet-mapping>

 

Add an html file to map jsp

4. Objects in four domains

Pagecontext (page domain)

Request (request domain)

Session)

Servletcontext (application domain)

1. What is a domain?

Is the scope of the function.

2. What is the lifecycle of these four domains?

The page field is valid only on the current page and ends when you leave the page.

After the request domain sends the request,

The session domain is a session and ends after a session is completed.

The application domain is the entire web application.

3. When to use the object domain

If the page field is valid on the current page

When the request domain is used up by others

The session domain can be used by itself after a period of time.

When the Application domain is used by itself, not only can it be used by yourself, but also by others

 

 

Author: hj714886063

Related Article

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.