[Servlet & amp; JSP] standard tag

Source: Internet
Author: User

[Servlet & JSP] standard tag

Some Standard tags are provided in JSP specifications. All containers support these tags, which can help reduce the use of Scriptlet when compiling JSP. All standard labels are usedjsp:As a front-end. These Standard tags were proposed in the JSP getting up early specification, and later proposed JSTL (JSP Standard Tag Library) and Expression Language (Expression Language) in many functions, you can use the original standard labels.

And Tag

The include indicator element can statically include another JSP page. You can use Label. For example:

<jsp:include page="add.jsp">    <jsp:param name="a" value="1" />    <jsp:param name="b" value="2" /></jsp:include>

In the preceding example, add. jsp is included and parameters to be provided to the page are specified.

In fact, And Label. After the source code is translated as Servlet, the underlying layer also obtains the RequestDispatcher object and executes the corresponding forward () or include () method.

<jsp:useBean>, <jsp:setProperty>And <jsp:getProperty>Tag

The tag is used to match the standard tag of the JavaBean Component. The value-added JavaBean is a pure Java object that does not meet the following conditions, but is not a an component in the desktop system or EJB:

The java. io. Serializable interface must be implemented. class variables not made public include non-parameter constructors, public Setter methods, and Getter methods)

And The label is used to set and obtain the attribute values of the JavaBean.

Other standard labels

Other standard-based labels , They are related to the use of custom tags.

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.