JSP Mock Test IV PDF
JSP Mock Test IV PDF
This section presents you various set of Mock Tests related to JSP Framework. You can download
these sample mock tests at your local machine and solve offline at your convenience. Every mock
test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - Which of the following is true about Cleanup phase in JSP life cycle?
A - The destruction phase of the JSP life cycle represents when a JSP is being removed from use
by a container.
B - The jspDestroy method is the JSP equivalent of the destroy method for servlets.
A - useBean action first searches for an existing object utilizing the id and scope variables. If an
object is not found, it then tries to create the specified object.
B - The Bean must have been previously defined before using setProperty action.
B - The forward action forwards the request to another resource such as a static page, another
JSP page, or a Java Servlet.
Q 8 - What is Internationalization?
Q 9 - What is Localization?
B - Locale is usually referred to as a language symbol followed by a country symbol which are
separated by an underscore.
Q 11 - What is difference between <%-- comment --%> and <!-- comment -->?
A - <%-- comment --%> is JSP comment. <!-- comment --> is an HTML comment.
A - true
B - false
A - true
B - false
Q 14 - Can you make use of a ServletOutputStream object from within a JSP page?
A - true
B - false
C - It removes a variable from either a specified scope or the first scope where the variable is
found
A - to catch any Throwable that occurs in its body and optionally exposes it.
B - It evaluates an expression and displays its body content only if the expression evaluates to
true.
A - The <c:choose> works like a Java switch statement in that it lets you choose between a
number of alternatives.
A - The <c:forEach > exists as a good alternative to embedding a Java for, while, or do-while loop
via a scriptlet.
A - The <c:param> tag allows proper URL request parameter to be specified with URL.
A - The <c:redirect > tag redirects the browser to an alternate URL by providing automatically
URL rewriting.
A - The <c:url> tag formats a URL into a string and stores it into a variable.
A - Taglibs are for generating presentation elements while JavaBeans are good for storing
information and state.
B - Custom tags are used to implement actions and JavaBeans are used to present information.
ANSWER SHEET
1 C
2 C
3 C
4 C
5 C
6 C
7 A
8 B
9 C
10 C
11 D
12 A
13 A
14 B
15 A
16 B
17 C
18 A
19 B
20 D
21 C
22 C
23 D
24 C
25 A
Loading [MathJax]/jax/output/HTML-CSS/jax.js