JavaBeans Quiz

Answer the following questions and click Test when finished to see how well you did.

  1. JavaBeans are ?
    A special Java class file
    Servlets
    Applets
    A Special form of JSP

     

  2. The benefits of using JavaBeans are ?
    Reuseability
    Separation of logic from presentation
    Reuseability
    All of the above

     

  3. When using the <jsp:useBean/> to reference a JavaBean for use within a JSP the id attribute defines,
    The class name of the JavaBean
    The package name of the JavaBean
    The instance name of the JavaBean
    There is no id attirbute

     

  4. In both <jsp:setProperty/> and <jsp:getProperty/> the attributes can take JSP expressions as values, for example
    <jsp:setProperty name="employeeBean"
                   property="firstName"
                   value="<%= strFirst %>" />
    
    True
    False

     

  5. To synchronise an HTML form with a JavaBean you would add which of the following statements,

    <jsp:synchronize name="BeanName" />
    <jsp:setProperty name="BeanName" property="" />
    <jsp:setProperty name="BeanName" property="*" />
    <jsp:setProperty name="BeanName" property="All" />

     

Thank You !

thank you for taking this online course. I hope you found it instructive and you will find it beneficial to your work. I really appreciate feedback - good and bad - I will improve on items that need attention.

Back