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.