wellnwill

JSP

<jsp:useBean>

  • <jsp:useBean> tag is used for creating Java Bean object
  • Syntax with example
    <jsp:useBean id="" class="" scope="" />
    <jsp:useBean id="user" class="com.learnjsp.bean.User" scope="session" />
    
  • scope attribute used to tell the scope of the bean eg: request, session etc.

<jsp:setProperty>

  • <jsp:setProperty> is used for storing data in Java Bean object
Syntax with example
<jsp:setProperty name="" property="" value="" />
<jsp:setProperty name="user" property="userName" value="Atul" />

<jsp:getProperty>

  • <jsp:getProperty> is used to fetch data from Java Bean object
Syntax with example
<jsp:getProperty name="" property="" />
<jsp:getProperty name="user" property="userName" />
Footer with Map