JSP behavior

Disclaimer: This article is a blogger original article, reproduced, please attach Bowen link! https://blog.csdn.net/f2764052703/article/details/90053737

JSP behavior is a set of built-in JSP tag, the standard format for the JSP behavior<jsp:elements { attribute='value' }>


<Jsp: include /> behavior

Contains a file for the run-time behavior include, if included in a JSP program, the program will first execute JSP, then the results included.

The syntax for include: <jsp:include page="URL" flush="true">
Page: included files relative path
flush: before including whether to clear the cache file, the default is false

include behavior at runtime is included, which is the first file will be compiled to include, after the two files into one file contains.


Use Java Bean, contains userBean / setProperty / getProperty

useBean syntax is: <jsp:userBean id="beanId" class="className" scope="Value" />
the above mentioned id: JavaBean object name
class: full class name javaBean of
scope: JavaBean objects scope, page (current page valid), request (the current request is valid), session (for the current session), application (whole effective application)

Once you have JavaBean can operate on JavaBean properties using setProperty / getProperty behavior.

setProperty syntax is: <jsp:setProperty name="beanName" property="propertyName" value="" />
name: JavaBean of the above mentioned id
the propertys: Name attribute
value: property value

getProperty The syntax is: <jsp:getProperty name="beanName" property="propertyName" />
name: JavaBean of the above mentioned id
the propertys: attribute name


<Jsp: forword /> Jump

<jsp:forword page="URL">

Guess you like

Origin blog.csdn.net/f2764052703/article/details/90053737
jsp