1.

What Is The Jsp:getproperty Action?

Answer»

The <jsp:getProperty> ACTION is USED to ACCESS the properties of a bean that was set using the <jsp:getProperty> action. The container converts the property to a String as follows:

  • If it is an object, it uses the toString() method to convert it to a String.
  • If it is a primitive, it converts it directly to a String using the valueOf() method of the corresponding Wrapper class.
  • The syntax of the <jsp:getProperty> method is: <jsp:getProperty NAME="Name" property="Property" />

Here, name is the id of the bean from which the property was set. The property attribute is the property to get. A user must CREATE or locate a bean using the <jsp:useBean> action before using the <jsp:getProperty> action.

The <jsp:getProperty> action is used to access the properties of a bean that was set using the <jsp:getProperty> action. The container converts the property to a String as follows:

Here, name is the id of the bean from which the property was set. The property attribute is the property to get. A user must create or locate a bean using the <jsp:useBean> action before using the <jsp:getProperty> action.



Discussion

No Comment Found