Getting a Property value in jsp
This section illustrates you how to use <jsp:getProperty> tag.
To reduce the the scriplet code with jsp, there is an easier way of accessing properties of bean by using getProperty tag which automatically sends the result of the method. The tag <jsp:getProperty> has two attributes, name and property. Name attribute refers to the id of the bean and property attribute refers to the method of the bean. Here we are providing you an example which illustrates you the use of <jsp:getProperty> tag.
Here is the code of getProperty.jsp
Here is the bean GetProperties.java
In the above example, we are using bean with <jsp:useBean> tag. <jsp:getProperty> tag calls the bean and its method 'text' with its attributes id and property.
Here is the output