Last Updated At 2020-06-15

JSP Action Tag:
There are numerous JSP activity labels or components. Each JSP activity tag is utilized to play out some particular undertakings. The activity labels are utilized to control the stream among pages and to utilize Java Bean.- jsp:forward
- jsp:include
- jsp:param
- jsp:useBean
- jsp:setProperty
- jsp:getProperty
Syntax of jsp:forward action tag without parameter:
Syntax of jsp:forward action tag with parameter:
The jsp:include activity tag is utilized to incorporate the substance of another asset it might be jsp, html or servlet. The jsp incorporate activity tag incorporates the asset at ask for time so it is better for dynamic pages in light of the fact that there may be changes in future. The jsp:include tag can be utilized to incorporate static and dynamic pages.
Syntax of jsp:include action tag without parameter
Syntax of jsp:include action tag with parameter
Java Bean
A Java Bean is a java class- no-arg constructor.
- Serializable.
- The methods to set and get the values of the methods, known as getter and setter methods.
Why use Java Bean?
it is a reusable software component. A bean can be arranged in to many objects int one object, so this object from multiple places, it is easy maintenance. |
Simple example of java bean class
//Employee.javapackage mypack;public class Employee implements java.io.Serializable{private int id;private String name;public Employee(){}public void setId(int id){this.id=id;}public int getId(){return id;}public void setName(String name){this.name=name;}public String getName(){return name;}}Ø By using getter and setter methods to access the java bean class. |
The jsp:useBean activity tag is utilized to find or instantiate a bean class. In the event that bean protest of the Bean class is now made, it doesn't make the bean contingent upon the extension. In any case, if protest of bean is not made, it instantiates the bean.