Self Test With Answers




1) Which of the following is not a JSP Directive?

a) page
b) declaration
c) taglib
d) include                                     ( b )

// A declaration is a different JSP tag type

2) Fill in the name of the page attribute and the default value for each
    of the following desciptions
.

i) _________      used to provide page information 
( default value )   _____________  ( info:none )

ii) _________ decides if the page participates in a session
( default value ) ______________  ( session: true )

iii) _________  used to make java packages available to page's java code
( default value )_______________ (import:none)

iv) ________  attribute that dictates scripting language chosen
( default value)_______________ ( language:Java)

v)  ________   used to change the default superclass of a jsp servlet
(default value) _______________ ( extends: none )

vi) ________   used to control buffering characteristics of page response
( default value  )______________ ( buffer:8kb )

vii) _______  decides if buffer sends when full or will throw exception
(default value ) ______________ ( autoFlush:true)

viii) _______  tells the container the page is safe to multithread
( default value ) _______________ ( isThreadSafe: true )

 ix) ________ tells the container that this page is an error page
(default value ) _______________  ( isErrorPage: none )

x )  ________ tells the container what the MIME type of the page is
( default value ) _______________ ( contentType: text/html )


3)  A declaration tag uses which of the following symbols

a) @
b) !
c) =
d) *                                                       ( b )

4 ) True or False: A declaration contains statements that end
      with a semi-colon or a curley brace                ( True )

5 ) Expression use which of the following symbols.

a) @
b) !
c) =
d) *                                                        ( c  )

6)  True or False: An expression contains a statement that ends in
     a semi-colon.                                      ( False )

7) What is the form of a JSP comment? _________  (   <%--      --%>   )

8) Which of the following symbols is associated with scriptlet?

a) !
b) %
c) =
d)
@                                                              ( b )