Actions Self Test With Answers      
                                     


1) Can you recall what the name of the implicit object is that is associated
     with each of the following Java classes or interfaces?
     the following implicit objects.

a) HttpJspPage             __________  ( page )                      
b) ServletRequest         __________  ( request )
c) ServletResponse       __________   ( response )
d) ServletConfig              __________ ( servletConfig )
e) ServletContext            __________  (servletContext)
f)  HttpSession               __________   ( session )
g) ServletContext           __________  ( application )
h) Throwable                 __________ ( exception )


2) True or False? The constants that represent JSP scopes
    contain integer
values. True \ False                 ( True )
 

3) Which of the following is not a value of a scope in JSP?

a) application
b) sesssion
c) response
d) page                                                                ( c )
 

4) True or False? You can place a primitive data type as a value
of an attribute in a session object. True \ False      ( False )

// Have to use wrappers to represent primitives in a session object

 5) True or False? When ever the following tag appears in  a JSP page,
    a new bean instance is created. True \ False          ( True ) 

<jsp:useBean id="user" class="com.jguru.Person" scope="session" />
 

6) True or False? The include directive and include action work the same
     way and are just different syntax for the same thing.   True \ False         
 ( False )

// The include directive is executed translation and compile while the
// include action is executed at runtime