Explanation of the basic functions of useBean in JSP, and explanation of jspusebean

Source: Internet
Author: User

Explanation of the basic functions of useBean in JSP, and explanation of jspusebean

UseBean acts on defining a java Bean object in JSP. The behavior format is . The attributes are as follows:

Id: Valid Java variable name, indicating the name of the Java Bean object. JSP can use this name to reference this JavaBean object

Class: The full name of the java Bean class and the full name of the JavaBean class.

Sope: page, request, session, application. The scope of the Java Bean object. When it is page, it is only valid in this jsp. If it is a request, it is only valid in the current request. This parameter is valid for the current user when it is a session. When the value is application, the current Web application is valid. The default value is page.

After the useBean behavior defines the Java Bean object, you can get the Java Bean attribute through the getPropert behavior, or set the Java Bean attribute through the setPropert behavior. The getProperty behavior format is . SetProperty behavior format: . Here, name is the name of the Java Bean, that is, the id attribute in useBean behavior, property is the Java Bean attribute, and value is the property value.

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.