Review: Using JavaBeans
Components with JSP
Benefits of jsp:useBean
Hides the Java programming language syntax
Makes it easier to associate request parameters with 
objects (bean properties)
Simplifies sharing objects among multiple requests or 
servlets/JSPs
jsp:useBean 
Creates or accesses a bean
jsp:getProperty
Puts bean property (i.e. getXxx call) into output
jsp:setProperty
Sets bean property (i.e. passes value to setXxx)
119
JSP
www.corewebprogramming.com
Review: Creating Custom 
JSP Tag Libraries
For each custom tag, you need
A tag handler class (usually extending
TagSupport or BodyTagSupport)
An entry in a Tag Library Descriptor file
A JSP file that imports library, specifies prefix, 
and uses tags
Simple tags
Generate output in doStartTag, return SKIP_BODY
Attributes
Define setAttributeName method. Update TLD file
Body content
doStartTag returns EVAL_BODY_INCLUDE
Add doEndTag method
120
JSP
www.corewebprogramming.com
60




  

Home

About Services Network Support FAQ Order Contact
 

Java Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved