Jsp Beans known as a property attribute that is been used for the accessing the user of object the content may be java class or package that is been used to access the class field of object.
In simple words if we explain jsp beans this attribute use to access the property from a class file file must be java type or other as mentioned. In this example we use to display the property on the web browser we made a package named ‘p1’ in this we made a java file which class file will be use to access the data. In java file we create a program that is been use for getting and putting the value from property contents. Then we create a jsp file that will use the class file of java type while executing for output on the web browser. Attributes that are use to initialize like set property or beans id…let’s take a look on program.
<jsp:useBean id=”bean” class=”p1.jspbean”>
<br><h3 align=”center”><jsp:setProperty name=”bean” property=”str” value = “Java Server Pages” /></center></br>
<p> <jsp:getProperty name=”bean” property=”str” /></p>
Java File used In Program.
public class jspbean
public String getStr()
public void setStr(String str)
this.str = str;