PRJ321 COMPLETE ACTUAL EXAM QUESTIONS
WITH DETAILED VERIFIED ANSWERS (100%
CORRECT ANSWERS) /ALREADY GRADED A+
Terms in this set (166)
What gets printed when the d
following expression is
evaluated? Select the one
correct answer.${(1==2) ? 4
: 5}
a. 2
b. 3
c. 4
d. 5
Consider the following bd
HTML page code: Identify
the two methods that can
be used to retrieve the value
of the name parameter
when the form is submitted.
Select one or more:
a. getParameterValue( "name");
b. getParameterValues(
"name");
c. getParameters( "name");
d. getParameter( "name");
Which JSTL tag likes <%= ... d
>?Select one:
a. <c:out.print>
b. <c:output>
c. <c:in>
d. <c:out>
1/73
,3/29/25, 10:37 PM PRJ321
What is the difference c
between MVC1 and MVC2?
a. MVC1 is page-
centric, MVC2 is
controller-centric
b. MVC2 is page-
centric, MVC1 is
controller-centric
c. The MVC1 process goes
from one JSP page to
another, while MVC2 directs
to a common panel before
directing to another page
d. MVC2 makes use of a
system controller while
MVC1 doesn't.
What are Struts 2 Features? cde
Choose 3
a. Struts 2 Actions are
depend on the servlet
API
b. Struts 2 Actions are thread
safe
c. Any POJO class can be
used as Action class.
d. No need of Action forms in
Struts 2.
e. Struts 2 allows validation
by using the validate()
method in Action class.
Which of the following a
statements about the
Servlet is false? Select one:
a. Initialization code in
servlets is executed every
time the program is made to
run
b. Servlets are portable
c. Servlets are easy to use
2/73
,3/29/25, 10:37 PM PRJ321
d. All of the others
e. None of the others
The deployment descriptor bd
for a stateless session bean
that uses the isCallerInRole
method reads as follows:
3. <security-role-ref>
4. <role-name>manager</role-
name>
5. <role-
link>humanresources</role-
link>
6. <security-role-ref>
16. <security-role>
17. <description>
18. Is allowed to view and
update all employee
records.
19. </description>
20. <role-
name>humanresources</r
ole- name>
21. </security-role>
Which two roles are
responsible for creating
this deployment
descriptor? ( Choose
two.) Select one or
more:
a. System Administrator
b. Bean Provider
c. Deployer
d. Application Assembler
3/73
, 3/29/25, 10:37 PM PRJ321
Which method is used to c
perform DML statements in
JDBC?
a. executeResult()
b. execute()
c. executeUpdate()
d. executeQuery()
Which of the following e
methods can be used to add
cookies to a servlet
response? Select one:
a. HttpServletResponse.add
Cookie( String contents)
b. ServletResponse.addHe
ader( String name,
String value)
c. ServletResponse.addC
ookie( String contents)
d. ServletResponse.addCo
okie( Cookie cookie)
e. HttpServletResponse.
addCookie( Cookie
cookie)
What is the HTTP 1.1 status a
code that indicates:
Everything's fine? Select one:
a. 200
b. 101
c. 202
d. 201
How does container b
initialize Servlet Object at
deploy time?
a. The servlet must be
declared into context
deployment descriptor with
servlet tag
b. The servlet must be
4/73