How to use Javabeans from JSP pages?

Explain how to use Javabeans from JSP pages.

Java beans are directly supported in JSP with JSP language elements. The java beans can easily be created, initialized and the setter and getter methods are used to set and get the values of their properties.

Java beans are used in two ways. The following examples illustrate it.

<jsp:useBean id="beanName" class="fully_qualified_classname" scope="scope"/>

<jsp:useBean id="beanName" class="fully_qualified_classname" scope="scope">
   <jsp:setProperty .../>
</jsp:useBean>
What is Tag extension in JSP model?
What is Tag extension in JSP model? - JSP supports the authors to add their own custom tags that perform custom actions...
What is Tag library descriptor (TLD)?
What is Tag library descriptor (TLD)? - The custom tags can be implemented or redistributed with tag handlers that are written in Java...
JSP page life cycle
A request from a browser is served as servlet in JSP. In this way the lifecycle and certain capabilities of JSP are determined by a servlet.
Post your comment