Detailed explanation of JSP application syntax (2)

Source: Internet
Author: User

8) labels:
Forward a request object. You can pass parameters. The target file must be able to process parameters.
And before use, jsp (the first choice for SUN Enterprise Applications) files already have data, so the File Execution will fail.
Attribute:
-Page = "URL or expression" indicates the URL of the file to be forwarded or an expression representing the URL.
-Name parameter name value parameter value.
9) labels:
+
Allows dynamic files and static files. Dynamic files are executed by the jsp (preferred for SUN Enterprise Applications) compiler. You cannot determine whether the file name is dynamic or static. parameters can be passed.
Attribute:
-Page = "URL or expression" must contain the relative path of the file, or represent the expression of the relative path.
-Flush = "true" you must use flush = "true" here. You cannot use false. The default value is false.
One or more parameters can be passed to a dynamic file, and multiple parameters can be transferred on a page.
 
10) labels:
Before obtaining the Bean property value, you must use create Bean. name to specify the id of the newly created Bean. Only the JavaBean
Attribute:
-Name = "bean name" is specified by the id attribute.
-Property = "bean property" specifies the Bean property name.
 
11) labels:
Name = "Bean id"
{
Property = "*"
Property = "propertyName" [param = "parameterName"]
Property = "propertyName" value = "{string | }"
}/>
The value of name should be in the value of id
You can set attribute values in multiple ways:
Match the attributes in the Bean by using all the values entered by the user (stored in the request object as parameters ).
Matches the attribute specified in Bean with the value specified by the user.
Use an expression to match Bean attributes at runtime
Attribute:
-Name = "Bean name" indicates the Bean variable set by the id in.
-Property = "Bean property name" value = "Name of the property to be set" if you use property = "*", Bean properties do not need to be sorted in the order in the Html form.
-Property = "*" stores all the values entered by the user in jsp (preferred for SUN Enterprise applications), used to match the attributes in Bean. the attribute name in Bean must be the same as the parameter name in the request object. the parameter values transmitted from the client to the server are generally character types. These strings must be converted to other types in order to be matched in the Bean, the following table lists the Bean attribute types and their conversion methods. convert string to other
Type method, Property type method:
Boolean or Boolean
Java. lang. Boolean. valueOf (String)
Byte or Byte
Java. lang. Byte. valueOf (String)
Char or Character
Java. lang. Character. valueOf (String)
Double or Double
Java. lang. Double. valueOf (String)
Integer or Integer
Java. lang. Integer. valueOf (String)
Float or Float
Java. lang. Float. valueOf (String)
Long or Long
Java. lang. Long. valueOf (String)

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.