Deck 4: Web Development and JSP
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 4: Web Development and JSP
1
What is the difference between servlets and applets?
i. Servlets execute on Server; Applets execute on browser
ii. Servlets have no GUI; Applet has GUI
iii. Servlets creates static web pages; Applets creates dynamic web pages
iv. Servlets can handle only a single request; Applet can handle multiple requests
A)i, ii, iii are correct
B)i, ii are correct
C)i, iii are correct
D)i, ii, iii, iv are correct
i. Servlets execute on Server; Applets execute on browser
ii. Servlets have no GUI; Applet has GUI
iii. Servlets creates static web pages; Applets creates dynamic web pages
iv. Servlets can handle only a single request; Applet can handle multiple requests
A)i, ii, iii are correct
B)i, ii are correct
C)i, iii are correct
D)i, ii, iii, iv are correct
i, ii are correct
2
Which are the session tracking techniques?
i. URL rewriting
ii. Using session object
iii.Using response object
iv. Using hidden fields
v. Using cookies
vi. Using servlet object
A)i, ii, iii, vi
B)i, ii, iv, v
C)i, vi, iii, v
D)i, ii, iii, v
i. URL rewriting
ii. Using session object
iii.Using response object
iv. Using hidden fields
v. Using cookies
vi. Using servlet object
A)i, ii, iii, vi
B)i, ii, iv, v
C)i, vi, iii, v
D)i, ii, iii, v
i, ii, iv, v
3
A deployment descriptor describes
A)Web component response settings
B)Web component setting
C)Web component request objects
D)All of the above
A)Web component response settings
B)Web component setting
C)Web component request objects
D)All of the above
Web component setting
4
The values of <servlet-name> and <servlet-class> in web.xml file
A)must be same
B)must not be same
C)may be same
D)None of the above
A)must be same
B)must not be same
C)may be same
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
Which one is the correct order of phases in JSP life cycle?
A)Initialization, Cleanup, Compilation, Execution
B)Initialization, Compilation, Cleanup, Execution
C)Compilation, Initialization, Execution, Cleanup
D)Cleanup, Compilation, Initialization, Execution
A)Initialization, Cleanup, Compilation, Execution
B)Initialization, Compilation, Cleanup, Execution
C)Compilation, Initialization, Execution, Cleanup
D)Cleanup, Compilation, Initialization, Execution
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Which technology do we mix our business logic with the presentation logic?
A)Servlet
B)JSP
C)Both A and B
D)None of the above
A)Servlet
B)JSP
C)Both A and B
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page?
A)The ErrorPage Attribute
B)The IsErrorPage Attribute
C)Both A & B
D)None of the above
A)The ErrorPage Attribute
B)The IsErrorPage Attribute
C)Both A & B
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
The ASP and JSP technologies are quite similar in the way they support the creation of Dynamic pages, using HTML templates, scripting code and components for business logic.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following is an advantage of the statement - Separation of business logic from JSP ?
A)Custom Tags in JSP
B)JSP Standard Tag Library
C)All the above
D)None of the above
A)Custom Tags in JSP
B)JSP Standard Tag Library
C)All the above
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you can do with Java servlets.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
JavaServer Pages often serve the same purpose as programs implemented using the Common Gateway Interface (CGI)
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Which is the Microsoft solution for providing dynamic Web content?
A)ASP
B)JSP
C)Both A and B
D)None of the above
A)ASP
B)JSP
C)Both A and B
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Which tag is used to execute java source code in JSP?
A)Declaration Tag
B)Scriptlet tag
C)Expression tag
D)None of the above
A)Declaration Tag
B)Scriptlet tag
C)Expression tag
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
A JSP page consists of which tags?
A)HTML tags
B)JSP tags
C)Both A & B
D)None of the above
A)HTML tags
B)JSP tags
C)Both A & B
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
Which packages does a JSP API consist of?
A)javax.servlet.jsp
B)java.servlet
C)javax.servlet.jsp.tagext
D)Both A & C
A)javax.servlet.jsp
B)java.servlet
C)javax.servlet.jsp.tagext
D)Both A & C
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the scripting of JSP not putting content into service method of the converted servlet?
A)Declarations
B)Scriptlets
C)Expressions
D)None of the above
A)Declarations
B)Scriptlets
C)Expressions
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
The difference between Servlets and JSP is the …………….
A)translation
B)compilation
C)syntax
D)Both A and B
A)translation
B)compilation
C)syntax
D)Both A and B
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following are the valid scopes in JSP?
A)request, page, session, application
B)request, page, session, global
C)response, page, session, application
D)request, page, context, application
A)request, page, session, application
B)request, page, session, global
C)response, page, session, application
D)request, page, context, application
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
JSP includes a mechanism for defining …………………………. or custom tags.
A)static attributes
B)local attributes
C)dynamic attributes
D)global attributes
A)static attributes
B)local attributes
C)dynamic attributes
D)global attributes
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Why DB connections are not written directly in JSPs?
A)Response is slow
B)Not a standard J2EE architecture
C)Load Balancing is not possible
D)Both B and C
A)Response is slow
B)Not a standard J2EE architecture
C)Load Balancing is not possible
D)Both B and C
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Which is not a directive?
A)include
B)page
C)export
D)taglib
A)include
B)page
C)export
D)taglib
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
Which http method send by browser that asks the server to get the page only?
A)get
B)option
C)put
D)post
A)get
B)option
C)put
D)post
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
Which tag should be used to pass information from JSP to included JSP?
A)Using <%jsp:page> tag
B)Using <%jsp:param> tag
C)Using <%jsp:import> tag
D)Using <%jsp:useBean> tag
A)Using <%jsp:page> tag
B)Using <%jsp:param> tag
C)Using <%jsp:import> tag
D)Using <%jsp:useBean> tag
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
_jspService() method of HttpJspPage class should not be overridden.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
Which is not a directive?
A)include
B)page
C)export
D)useBean
A)include
B)page
C)export
D)useBean
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck