Deck 3: Java Server Pages JSP and Java Script
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 3: Java Server Pages JSP and Java Script
1
Which of the following are examples of JSP directive? Select the two correct answers.
A) include
B) exclude
C) import
D) taglibrary
A) include
B) exclude
C) import
D) taglibrary
include
2
A JSP page uses the java. util. ArrayList class many times. Instead of referring the class by its complete package name each time, we want to just use ArrayList. Which attribute of page directive must be specified to achieve this? Select the one correct answer.
A) extends
B) import
C) include
D) package
A) extends
B) import
C) include
D) package
import
3
A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML file?
A) contentType
B) generateXML
C) type
D) outputXML
A) contentType
B) generateXML
C) type
D) outputXML
contentType
4
JSP pages have access to implicit objects that are exposed automatically. Name the implicit object that is of type HttpSession.
A) session
B) application
C) httpSession
D) httpsession
A) session
B) application
C) httpSession
D) httpsession
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
JSP pages have access to implicit objects that are exposed automatically. One such object that is available is request. The request object is an instance of which class?
A) HttpRequest
B) ServletRequest
C) Request
D) HttpServletRequest
A) HttpRequest
B) ServletRequest
C) Request
D) HttpServletRequest
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
What is the limitation of creating ActionServlet instances per web application?
A) Two
B) Three
C) Unlimited
D) One
A) Two
B) Three
C) Unlimited
D) One
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
ActionServlet, RequestProcessor and Action classes are the components of
A) View
B) Model
C) Deployment
D) Controller
A) View
B) Model
C) Deployment
D) Controller
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
Which of the java bean tags is used to show the bean value on the web page?
A) < bean:define>
B) < bean:message>
C) < bean:show>
D) < bean:write>
A) < bean:define>
B) < bean:message>
C) < bean:show>
D) < bean:write>
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following are server side programming languages?
1) HTML
2) JavaScript
3) JSP
4) Sevlets
A) 1,2,3,4
B) 1,2
C) 3,4
D) None
1) HTML
2) JavaScript
3) JSP
4) Sevlets
A) 1,2,3,4
B) 1,2
C) 3,4
D) None
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
What JSP is basically used today?
A) To make controller
B) To make GUI
C) In writing business logic
D) Deprecated
A) To make controller
B) To make GUI
C) In writing business logic
D) Deprecated
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
What is the purpose of <noscript> tag in Java Script?
A) Prevents scripts on the page from executing.
B) Enclose text to be displayed by non -JavaScript browsers.
C) Suppresses the result to be displayed on the web page.
D) None of the above.
A) Prevents scripts on the page from executing.
B) Enclose text to be displayed by non -JavaScript browsers.
C) Suppresses the result to be displayed on the web page.
D) None of the above.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Java Script entities start with ___________and end with _____________
A) Semicolon, colon
B) Semicolon, Ampersand
C) Ampersand, colon
D) Ampersand, semicolon.
A) Semicolon, colon
B) Semicolon, Ampersand
C) Ampersand, colon
D) Ampersand, semicolon.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Which of the following is a server-side Java Script object?
A) Function
B) File
C) FileUpload
D) Date
A) Function
B) File
C) FileUpload
D) Date
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
Which of the following is a client-side Java Script object?
A) Function
B) File
C) FileUpload
D) Date
A) Function
B) File
C) FileUpload
D) Date
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
Which of the following is the correct way for writing Java Script array?
A) var salaries = new Array(1:39438, 2:39839 3:83729)
B) var salaries = new (Array1=39438, Array 2=39839 Array 3=83729)
C) var salaries = new Array(39438, 39839,83729)
D) var salaries = new Array() values = 39438, 39839 83729
A) var salaries = new Array(1:39438, 2:39839 3:83729)
B) var salaries = new (Array1=39438, Array 2=39839 Array 3=83729)
C) var salaries = new Array(39438, 39839,83729)
D) var salaries = new Array() values = 39438, 39839 83729
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following syntax is correct to refer an external script called "formValidation. js"?
A) <script href = "formValidation. js">
B) <script source = "formValidation. js">
C) <script name = "formValidation. js">
D) <script src = "formValidation. js">
A) <script href = "formValidation. js">
B) <script source = "formValidation. js">
C) <script name = "formValidation. js">
D) <script src = "formValidation. js">
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
What is the alternate name for Java script?
A) LimeScript
B) Both a and d
C) ECMScript
D) ECMAScript
A) LimeScript
B) Both a and d
C) ECMScript
D) ECMAScript
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
What type of image map could be used with Java Script?
A) Client-side image maps
B) Server-side image maps.
C) Both A and B
D) Localhost image maps
A) Client-side image maps
B) Server-side image maps.
C) Both A and B
D) Localhost image maps
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
Which of the following are capable of Java Script functions?
A) Returning multiple values
B) Accepting parameters and returning values
C) Accepting parameters
D) All choices are correct
A) Returning multiple values
B) Accepting parameters and returning values
C) Accepting parameters
D) All choices are correct
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Which of the following is not a valid JavaScript variable name?
A) 2java
B) _java_and_java_names
C) Javaandjava
D) None of the above
A) 2java
B) _java_and_java_names
C) Javaandjava
D) None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
What java wrapper type is created when a JavaScript object is sent to Java?
A) ScriptObject
B) JavaObject
C) Jobject
D) JSObject
A) ScriptObject
B) JavaObject
C) Jobject
D) JSObject
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following is correct to write "Hello World " on the web page?
A) System. out. println("Hello World")
B) print("Hello World")
C) document. write("Hello World")
D) response. write("Hello World")
A) System. out. println("Hello World")
B) print("Hello World")
C) document. write("Hello World")
D) response. write("Hello World")
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
How does Java Script store dates in objects of Date type?
A) The number of days since 1st, 1900
B) The number of seconds since January 1st, 1970
C) The number of milliseconds since January 1st, 1970
D) The number of picoseconds since January 1st, 1970
A) The number of days since 1st, 1900
B) The number of seconds since January 1st, 1970
C) The number of milliseconds since January 1st, 1970
D) The number of picoseconds since January 1st, 1970
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
Which attribute needs to be changed to make elements invisible?
A) Visibility
B) Visible
C) Invisibility
D) Invisible
A) Visibility
B) Visible
C) Invisibility
D) Invisible
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
Which machine actually executed the Java Script?
A) The web server
B) The machine which is running a web server.
C) Java Script engine
D) Both A and C
A) The web server
B) The machine which is running a web server.
C) Java Script engine
D) Both A and C
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck