Explain the jsp:setProperty action.

Report
Question
9 views

Please explain why do you think this question should be reported?

Report Cancel

It is used to give values to properties of beans that have been referenced beforehand.

<jsp:useBean id=”ABC”…/>

<jsp:setProperty name=”ABC”  property=”myProperty”…

 

jsp:setproperty is executed even if a new bean is instantiated or existing bean is found.

By adding </jsp.useBean> at the end of the code, the condition for execution is inverted i.e. It is not executed if existing object was found and only if a new object was instantiated.

Please follow and like us:

About the Author