Which label is used in the JSP allows parameters to be passed to the label

Source: Internet
Author: User
<jsp:include page= "callee.jsp"/>
  <jsp:param name= "param2" value= "value2"/> <jsp:param name= 
 "Param3" value= "Value3"/> 
</jsp:include>

The include instruction is introduced statically;

The include action is introduced dynamically.
Static and dynamic include is independent of the content of the page.


Unlike the <% @include ...%>, Jsp:include can pass parameters to the included page.

However, if the parameter is passed, the included page must be a JSP page.


For example: Pass parameters to the included page included2.jsp:
<jsp:include page= "included2.jsp" flush= "true" >
<jsp:param name= "Ref1" value= "AAA"/>
<jsp:param name= "Ref2" value= "BBB"/>
</jsp:include>


Page Property: Relative path indicates the included file
Flush property: You must use TRUE to indicate that the page can be refreshed.
You can use Jsp:param to pass parameters to the included dynamic page, which is the JSP page (while the include directive cannot), the parameters are passed as "parameter name-value" pairs, and the included pages use Request.getparameter ("parameter name") to get the value of the corresponding parameter


Expression: $ (param.name) is the equivalent of Request.getparameter (name).


Original: http://blog.csdn.net/sz_bdqn/article/details/7365260

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.