The following describes the meaning and usage of JSP labels.
<Jsp: include> the tag indicates a static or dynamic file.
<Jsp: forward> the tag indicates redirecting a static html/jsp file or a program segment.
Syntax:
<Jsp: forward page = "path"}/>
Or
<Jsp: forward page = "path"}>
<Jsp: param name = "paramName" value = "paramValue"/> ......
</Jsp: forward>
<Jsp: useBean> A tag is used to create a BEAN instance on the JSP page and specify its name and scope.
Syntax:
<Jsp: useBean id = "name" scope = "page | request | session | application" typeSpec/>
TypeSpec has the following possibilities:
Class = "className" | class = "className" type = "typeName" | beanName = "beanName" type = "typeName" | type = "typeName" |
Note:
In the use of this JSP tag, you must use class or type instead of both class and beanName. BeanName indicates the Bean name in the form of "a. B. c ".
<Jsp: getProperty> the tag indicates obtaining the BEAN property value, converting it into a string, and then inserting it into the output.
<Jsp: setProperty> tag indicates the attribute value in Bean.
<Jsp: setProperty name = "login" property = "username" value = "Paopao"> </jsp: setProperty>
<Jsp: setProperty name = "login" property = "password" value = "Love"> </jsp: setProperty>
<Jsp: plugin> the tag indicates executing an applet or Bean. If possible, you need to download a Java Plug-in to execute it.
The preceding figure shows the meaning and usage of these JSP labels.
- JSP Servlet call in tag Library
- Step for customizing JSP labels
- Introduction to JSP custom tag implementation process
- Fully use the tag function to compile JSP application JSTL)
- Detailed description of custom JSP labels