PRJ321 - Part I Exam Questions AND Correct Answers
(Choose 1 answer)
A <servlet> element can include zero to many <init-param>
elements: These aid in passing initialization parameter
information from the deployment descriptor to all the
servlets.
A. False
B. True - ✔✔a
(Choose 1 answer)
A developer must implement a 'shopping cart" object for a
web-based application. The shopping cart must be able to
maintain the state of the cart but the state is not stored
persistently. Which JEE (J2EE) tech
A. JMS
B. Stateless session beans
,C. Stateful session beans
D. Entity beans - ✔✔c
(Choose 1 answer)
A JSP file uses a tag as <myTaglib:myTag>. The myTag element
here should be defined in the which element of the taglib
element in the tag library descriptor file ?
A. tagname
B. name
C. tag
D. prefix - ✔✔b
(Choose 1 answer)
,A JSP page called testjsp is passed a parameter name in the
URL using http://localhost/testjsp?name="John". The testjsp
contains the following code.
<%! String myName=requestgetParameterO;%>
<% String test= "welcome" + myName; %>
<%= test%>
What is the output?
A. The program prints "Welcome John"
B. The program gives a syntax error because of the statement
<%! String myName=requestgetParameterO;%>
C. The program gives a syntax error because of the statement
<% String test= "welcome" + myName: %>
, D. The program gives a syntax error because of the statement
<%= test%> - ✔✔b
(Choose 1 answer)
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. <%@page contentType ='text/xml'>
B. <%@page contentType ='xml'>
C. <%@page contentType ='text/html*>
D. <%@page contentType ='html/xml*> - ✔✔a
(Choose 1 answer)
A(n)_enables a web application to obtain a Connection to a
database.
(Choose 1 answer)
A <servlet> element can include zero to many <init-param>
elements: These aid in passing initialization parameter
information from the deployment descriptor to all the
servlets.
A. False
B. True - ✔✔a
(Choose 1 answer)
A developer must implement a 'shopping cart" object for a
web-based application. The shopping cart must be able to
maintain the state of the cart but the state is not stored
persistently. Which JEE (J2EE) tech
A. JMS
B. Stateless session beans
,C. Stateful session beans
D. Entity beans - ✔✔c
(Choose 1 answer)
A JSP file uses a tag as <myTaglib:myTag>. The myTag element
here should be defined in the which element of the taglib
element in the tag library descriptor file ?
A. tagname
B. name
C. tag
D. prefix - ✔✔b
(Choose 1 answer)
,A JSP page called testjsp is passed a parameter name in the
URL using http://localhost/testjsp?name="John". The testjsp
contains the following code.
<%! String myName=requestgetParameterO;%>
<% String test= "welcome" + myName; %>
<%= test%>
What is the output?
A. The program prints "Welcome John"
B. The program gives a syntax error because of the statement
<%! String myName=requestgetParameterO;%>
C. The program gives a syntax error because of the statement
<% String test= "welcome" + myName: %>
, D. The program gives a syntax error because of the statement
<%= test%> - ✔✔b
(Choose 1 answer)
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. <%@page contentType ='text/xml'>
B. <%@page contentType ='xml'>
C. <%@page contentType ='text/html*>
D. <%@page contentType ='html/xml*> - ✔✔a
(Choose 1 answer)
A(n)_enables a web application to obtain a Connection to a
database.