JSP commonly used tags in the use of _jsp programming

Source: Internet
Author: User

Entity Bean defined in JSP
<jsp:usebean id= "clu" class= "Cn.domain.CacluBean" ></jsp:useBean>
<jsp:getproperty property= "propertyname" name = "CLU" > Gets the Bean's property value and outputs the value to the page;

El expression : ${entity object name}
When an El expression takes data, a. Number is usually used, and.

Pagecontext.findattribute ("Data");//page,request,session,application Lookup Order

<!--to find a bean in the page, if not, create a bean-->
<!--the contents of the label body are only used when creating the bean (instantiated).-->

The JSP assigns a value to the bean :
<!--hand-assigned value-->
<jsp:setproperty property= "Age" Name= "Personbean" value= "/>"
<!--request parameter assignment, request data support converts the string to 8 basic data types-->
<jsp:setproperty property= "Age" Name= "Personbean" param= "Age"/>
<jsp:setproperty property= "Birthdty" name= "Personbean" value= "<%=new" Date ()%> "/>"

<jsp:setproperty property= "*" Name= "clu" > Set the Bean's properties, with all the request parameters assigned to the bean;

To import Java Classes :

<%@ page import= "cn.domain.*"%>
<!--static include: Compile-time contains, compile all the JSP contained in a servlet, efficiency performance than dynamic include good-->

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.