Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Advanced
Sep 11, 2007

JSP and the Introspection Process

The introspection process allows the JSP engine to populate a JavaBean with the values provided by a client through an HTML form.

//when the names of the bean properties match the names of the HTML 
//form
<jsp:useBean id="bean_name_here" class="bean_class_here" scope="page|request|session|application">
    <jsp:setProperty name="bean_name_here" property="*"/>
</jsp:useBean>

//when the names of the bean properties don't match the names of the 
//HTML form

     <jsp:setProperty name="bean_name_here" 
                      param="HTML_form_property_name_here" 
                      property="bean_property_name_here"/>
</jsp:useBean>
This technique is very useful if you want to manage an HTML form through a JSP page.

Leonard Anghel
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap