I. <jsp:useBean>
This tag is used to declare and instantiate the JavaBean class. The syntax is as follows:
<jsp:usebeanid= "Object-name" scope= "page | Request | Session | Application "type=" Type-of-object "class=" Fully-qualified-classname "beanname=" Fully-qualified-beanname "/>"
Let's take a look at these properties:
ID-the name of the object, such as: String name = null; In this code, name is the ID;
scope--an optional attribute, when your JavaBean object will be corrupted, the default is page, and he means that each page will create a new JavaBean;
Type---An object of the same class or parent class, or an interface to be executed by that class, and his arguments are optional. For example: string name = "Faisal Khan"; string is what we talk about.
Class--a fully qualified category such as: Date d = new Java.util.Date (); Java.util.Date is what we call it.
beanname--is also a class that is fully qualified (fully qualified);
II. <jsp:setProperty>
This tag is used to design javabean values, the syntax is as follows:
<jsp:setpropertyname= "Id-of-the-javabean" property= "Name-of-property" param= "Name-of-request-parameter-to-use" "Value=" New-value-of-this-property "/>
The attribute is:
name--you set the ' id ' of the <jsp:useBean>
Property-the name you want to set
param--the name of the param you want to request in this property.
Value---The new values you want to set in this property
Iii. <jsp:getProperty>
This tag is used to return a particular property from a particular JavaBean, the syntax is as follows:
<jsp:getpropertyname= "Name-of-the-object" property= "Name-of-property"/>
' ID ' set in property:name--<jsp:usebean>
property--the name of the property you want to retrieve.
Well, now that we've finished learning to operate JavaBean JSP tags, let's take a moment to learn what the scope attribute is:
Each JavaBean class object, or other class object, has a scope (scope), meaning how long the object is kept in memory, where there are four scopes:
page--He means table A new object will be created or destroyed at each page level, and when you do not explicitly assign other values, he is <jsp:useBean> default.
Request--