Deck 8: Java Web Development: Methods, Variables, and Technologies
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 8: Java Web Development: Methods, Variables, and Technologies
1
Which of these method of DatagramPacket is used to find the length of byte array?
A)getnumber()
B)length()
C)length().
D)getlength()
A)getnumber()
B)length()
C)length().
D)getlength()
getlength()
2
Which of these method is used to start a server thread?
A)run()
B)start()
C)runthread()
D)startthread()
A)run()
B)start()
C)runthread()
D)startthread()
run()
3
Which of these method is called when http daemon is acting like a normal web server?
A)handle()
B)handleget()
C)handleget().
D)handleget(),
A)handle()
B)handleget()
C)handleget().
D)handleget(),
handleget().
4
Which of these methods of httpd class is used to read data from the stream?
A)getdta()
B)getresponse()
C)getstream()
D)getrawrequest()
A)getdta()
B)getresponse()
C)getstream()
D)getrawrequest()
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
Which of these method of httpd class is used to get report on each hit to HTTP server?
A)log()
B)logentry()
C)loghttpd()
D)logresponse()
A)log()
B)logentry()
C)loghttpd()
D)logresponse()
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Which of these method is used to find a URL from the cache of httpd?
A)findfromcache()
B)findfromcache().
C)servefromcache()
D)getfromcache()
A)findfromcache()
B)findfromcache().
C)servefromcache()
D)getfromcache()
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
Which of these variables stores the number of hits that are successfully served out of cache?
A)hits
B)hitstocache
C)hits_to_cache
D)hits.to.cache
A)hits
B)hitstocache
C)hits_to_cache
D)hits.to.cache
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
Which of these method of httpd class is used to write UrlCacheEntry object into local disk?
A)writediskcache()
B)writetodisk()
C)writecache()
D)writediskentry()
A)writediskcache()
B)writetodisk()
C)writecache()
D)writediskentry()
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
Which of these is an instance variable of class httpd?
A)port
B)cache
C)log
D)all of the mentioned
A)port
B)cache
C)log
D)all of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
Which of these is an instance variable of httpd that is a Hashtable?
A)port
B)cache
C)log
D)stopflag
A)port
B)cache
C)log
D)stopflag
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
Which of these exception is thrown by URL class's constructors?
A)urlnotfound
B)urlsourcenotfound
C)malformedurlexception
D)urlnotfoundexception
A)urlnotfound
B)urlsourcenotfound
C)malformedurlexception
D)urlnotfoundexception
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Which of these methods is used to know host of an URL?
A)host()
B)gethost()
C)gethost().
D)gethost(),
A)host()
B)gethost()
C)gethost().
D)gethost(),
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Which of these methods is used to know the full URL of an URL object?
A)fullhost()
B)gethost()
C)externalform()
D)toexternalform()
A)fullhost()
B)gethost()
C)externalform()
D)toexternalform()
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
Which of these class is used to access actual bits or content information of a URL?
A)url
B)urldecoder
C)urlconnection
D)all of the mentioned
A)url
B)urldecoder
C)urlconnection
D)all of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
Which object of HttpSession can be used to view and manipulate information about a session?
A)session identifier
B)creation time
C)last accessed time
D)all mentioned above
A)session identifier
B)creation time
C)last accessed time
D)all mentioned above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
Which of these ways used to communicate from an applet to servlet?
A)rmi communication
B)http communication
C)socket communication
D)all mentioned above
A)rmi communication
B)http communication
C)socket communication
D)all mentioned above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
Which methods are used to bind the objects on HttpSession instance andget the objects?
A)setattribute
B)getattribute
C)both a & b
D)none of the above
A)setattribute
B)getattribute
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
18
Which type of ServletEngine is a server that includes built-in support for servlets?
A)add-on servletengine
B)embedded servletengine
C)standalone servletengine
D)none of the above
A)add-on servletengine
B)embedded servletengine
C)standalone servletengine
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
What type of servlets use these methods doGet(), doPost(),doHead, doDelete(), doTrace()?
A)genereic servlets
B)httpservlets
C)all of the above
D)none of the above
A)genereic servlets
B)httpservlets
C)all of the above
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Which cookie it is valid for single session only and it is removed each time when the user closes the browser?
A)persistent cookie
B)non-persistent cookie
C)all the above
D)none of the above
A)persistent cookie
B)non-persistent cookie
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
21
Which action tags are used in JSP for developing web application with Java Bean?
A)jsp:usebean
B)jsp:setproperty
C)jsp:getproperty
D)both b & c
A)jsp:usebean
B)jsp:setproperty
C)jsp:getproperty
D)both b & c
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
Which technology do we mix our business logic with the presentation logic?
A)servlet
B)jsp
C)both a & b
D)none of the above
A)servlet
B)jsp
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
23
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
24
Which JSP Action tags is used to include the content of another resource,it May be jsp, html or servlet?
A)jsp:include
B)jsp:forward
C)jsp:plugin
D)jsp:papam
A)jsp:include
B)jsp:forward
C)jsp:plugin
D)jsp:papam
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
In JSP how many ways are there to perform exception handling?
A)3
B)2
C)4
D)5
A)3
B)2
C)4
D)5
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck