Which element is the parent of the <filter> tag in the web application deployment descriptor?
a. <filters>
b. <web-app>
c. <servlet>
d. <filter-list> correct answers b
What are two principal methods to manage session?
Select one or more:
a. Cookie
b. HTML field
c. response
d. URL rewriting
e. request correct answers a,d
The ________ method returns the actual length of the request sent by the client
Select one:
a. getServerName()
b. getAttribute()
c. getContentLength()
d. getParameter() correct answers c
Which are the correct options about page object from the following statements?
Select one:
a. The page objects use methods defined in this class to access implicit objects in a Web
page.
b. The page object is an instance of the javax.servlet.jsp class.
c. The page object is an instance of the java.lang.Object.
d. The page object has page scope.
e. A page object is an instance of the servlet processing the current request in a JSP page.
correct answers c
Which one is the correct option from the following statements for translation unit?
Select one:
a. A JSP page only includes the contents of servlet pages.
b. The translation unit consists of the JSP source file as well as all of its static include files.
c. Dynamic include files form a part of the translation unit.
d. The translation unit processes the JSP page and converts it to HTML page. correct answers
b
If necessary, you can nest one JSTL if tag within another.
Select one:
a. True
b. False correct answers a
What is the initial contact point for handling a web request in a Page-Centric architecture?
Select one:
a. A servlet.
b. A Java bean.
,c. A JSP page.
d. A session manager. correct answers c
Which of the following are valid uses of the <jsp:useBean> action? ( Select two)
Select one or more:
a. <jsp:useBean id="address" beanName="AddressBean"
type="AddressBean" />
b. <jsp:useBean id="address" class="AddressBean"
type="AddressBean" />
c. <jsp:useBean id="address" beanName="AddressBean"
class="AddressBean" />
d. <jsp:useBean id="address" class="AddressBean" name="address" /> correct answers a,b
In JSP, the import attribute of the page directive will .......
Select one:
a. put the statement for importing a library/ given class to the JSP servlet class declaration.
b. None of the others.
c. allow to declare a function in JSP page.
d. insert a given code to the body of the _jspService(...) method. correct answers a
Which mechanism does Struts 2 can be used some components in any projects or libraries?
Select one:
a. Using JavaBeans
b. Using xml to configure
c. Using Action Context to contain information
d. None of the others correct answers a
Which of the following statements about the jsp:useBean is ( are) true?
Select one:
a. All of the others
b. The jsp:useBean is used to locate or instantiate a JavaBean component
c. The jsp:useBean first tries to locate an instance of the bean, otherwise it instantiates the
Bean from a class
d. To locate and instantiate the Bean, the jsp:useBean attempts to locate a Bean within the
scope correct answers a
What are characteristics of a JPA Entity? ( Select three)
Select one or more:
a. It can be uniquely identified by a primary key.
b. it manages persistent data in concert with a JPA entity manager;
c. It is EJB 3.0-compliant;
d. It allows Java EE applications to process messages asynchronously correct answers a,b,c
Message Driven Beans ( MDBs) are designed to function as: ( Select one)
Select one:
a. Asynchronous message publisher
b. Synchronous message publisher
c. Asynchronous message consumer
d. Synchronous message consumer correct answers c
,Which structure of Request Line in Request Message is?
Select one:
a. None of the others
b. [HTTP Method] [Protocol Version] [Requested Resource forming URI]
c. [HTTP Method] [Requested Resource forming URI] [Protocol Version]
d. [Requested Resource forming URI] [HTTP Method] [Protocol Version] correct answers c
Which of the following correctly defines data integrity?
Select one:
a. It guarantees that information is accessible only to certain users.
b. All of the others
c. It guarantees that the information is kept in encrypted form on the server.
d. It guarantees that unintended parties cannot read the information during transmission
between the client and the
server.
e. None of the others correct answers d
The test.jsp contains the following code.
<%!
String s = "String 1";
%>
<%
String s = "String 2";
System.out.println("s = " + s);
%>
What is the output?
Select one:
a. The server display "s = String 1"
b. None of the others
c. The program gives a syntax error because of the statement String s = "String 1"
d. The program gives a syntax error because of the statement String s = "String 2"
e. The server display "s = String 2" correct answers e
Given:
${2 + "2"} = \${2 + 2}
Which result is correct?
Select one:
a. ${2 + "2"} = 4
b. ${2 + "2"} = ${2 + 2}
c. None of the others
d. 4 = ${2 + 2} correct answers d
Given the following statements about an EJB deployment descriptor for which the metadata-
complete attribute is not
specified:
I. The EJB deployment descriptor can provide additional metadata to bean class annotations.
II. The EJB deployment descriptor can partially override bean class annotations.
III. The EJB deployment descriptor can entirely override bean class annotations.
Which is true?
Select one:
, a. Both statements I and II are correct.
b. Only statement II is correct.
c. Both statements I and III are correct.
d. Only statement III is correct.
e. Only statement I is correct. correct answers a
The ________interface is a Java interface that enumerates the business methods exposes by
the enterprise bean class.
Select one:
a. bean
b. home
c. local home
d. remote correct answers d
The ________ method called by the servlet container to allow the servlet to response to a
request.
Select one:
a. init( )
b. service( )
c. getServletContext( )
d. getInitParameter( ) correct answers b
Which method( s) must be generated in servlet when the jsp page is translated?
Select one:
a. All of the others.
b. jspDestroy
c. _jspService
d. jspInit correct answers a
Which is NOT the party that need involved in the EJB Ecosystem?
Select one:
a. End users
b. EJB Deployer
c. Application Assembler
d. Bean Provider
e. System Administrator correct answers a
Study the statements:
1)URL rewriting may be used when a browser is disabled.
2)In URL encoding the session id is included as part of the URL.
Select one:
a. Only statement 2 is true.
b. Only statement 1 is true.
c. Both 1 and 2 are not true.
d. Both 1 and 2 are true. correct answers d
In Persistence API, an entity manager defines the scope under which particular entity
instances are created, persisted, and
removed.
Select one: