QUESTION NO: 211
A developer is designing the presentation tier for a web application that relies on a complex
session bean. The session bean is still being developed and the APIs for it are NOT finalized. Any
changes to the session bean API directly impacts the development of the presentation tier. Which
design pattern provides a means to manage the uncertainty in the API?
A. View Helper
B. Front Controller
C. Composite View
D. Intercepting Filter
E. Business Delegate
F. Chain of Responsibility
Answer: E
QUESTION NO: 212
A developer is designing a multi-tier web application and discovers a need to log each incoming
client request. Which two patterns, taken independently, provide a solution for this problem?
(Choose two.)
A. Transfer Object
B. Service Locator
C. Front Controller
D. Intercepting Filter
E. Business Delegate
F. Model-View-Controller
Answer: C,D
QUESTION NO: 213
A developer is designing a multi-tier web application and discovers a need to hide the details of
establishing and maintaining remote communications from the client. In addition, because the
business and resource tiers are distributed, the application needs to minimize the inter-tier network
traffic related to servicing client requests. Which design patterns, working together, address these
issues?
A. Front Controller and Transfer Object
B. Front Controller and Service Locator
C. Business Delegate and Transfer Object
D. Business Delegate and Intercepting Filter
E. Model-View-Controller and Intercepting Filter
Answer: C
QUESTION NO: 214 DRAG DROP
Click the Task button.
Place the servlet name onto every request URL, relative to the web application context root, that
will invoke that servlet. Every request URL must be filled.
Answer:
QUESTION NO: 215
Given a portion of a valid Java EE web application's directory structure:
MyApp
|
|-- File1.html
|
|-- Directory1
| |-- File2.html |
|-- META-INF
|-- File3.html
You want to know whether File1.html, File2.html, and/or File3.html will be directly accessible by
your web client's browsers.
Which statement is true?
A. All three files are directly accessible.
B. Only File1.html is directly accessible.
C. Only File2.html is directly accessible.
D. Only File3.html is directly accessible.
E. Only File1.html and File2.html are directly accessible.
F. Only File1.html and File3.html are directly accessible.
G. Only File2.html and File3.html are directly accessible.
Answer: E
QUESTION NO: 216
Which three are described in the standard web application deployment descriptor? (Choose
three.)
A. session configuration
B. MIME type mappings
C. context root for the application
D. servlet instance pool configuration
E. web container default port bindings
F. ServletContext initialization parameters
Answer: A,B,F
QUESTION NO: 217
You have created a servlet that generates weather maps. The data for these maps is calculated
by a remote host. The IP address of this host is usually stable, but occasionally does have to
change as the corporate network grows and changes. This IP address used to be hard coded, but
after the fifth change to the IP address in two years, you have decided that this value should be
declared in the deployment descriptor so you do NOT have the recompile the web application
every time the IP address changes. Which deployment descriptor snippet accomplishes this goal?
A. <serlvet-param>
<name>WeatherServlet.hostIP</name>
<value>127.0.4.20</value>
</servlet-param>
B. <init-param>
<name>WeatherServlet.hostIP</name>
<value>127.0.4.20</value>
</init-param>
C. <servlet>
<!-- servlet definition here -->
<param-name>WeatherServlet.hostIP</param-name>
<param-value>127.0.4.20</param-value>
</servlet>
D. <init-param>
<param-name>WeatherServlet.hostIP</param-name>
<param-value>127.0.4.20</param-value>
</init-param>
E. <serlvet-param>
<param-name>WeatherServlet.hostIP</param-name>
<param-value>127.0.4.20</param-value>
</servlet-param>
Answer: D
QUESTION NO: 218
In which two locations can library dependencies be defined for a web application? (Choose two.)
A. the web application deployment descriptor
B. the /META-INF/dependencies.xml file
C. the /META-INF/MANIFEST.MF manifest file
D. the /META-INF/MANIFEST.MF manifest of a JAR in the web application classpath
Answer: C,D
QUESTION NO: 219
Which two about WAR files are true? (Choose two.)
A. WAR files must be located in the web application library directory.
B. WAR files must contain the web application deployment descriptor.
C. WAR files must be created by using archive tools designed specifically for that purpose.
D. The web container must serve the content of any META-INF directory located in a WAR file.
E. The web container must allow access to resources in JARs in the web application library
directory.
Answer: B,E
QUESTION NO: 220
Given this fragment from a Java EE deployment descriptor:
341. <error-page>
342. <exception-type>java.lang.Throwable</exception-type>
343. <location>/mainError.jsp</location>
344. </error-page>
345. <error-page>
346. <exception-type>java.lang.ClassCastException</exception-type>
347. <location>/castError.jsp</location>
348. </error-page>
If the web application associated with the fragment above throws a ClassCastException.
Which statement is true?
A. The deployment descriptor is invalid.
B. The container invokes mainError.jsp.
C. The container invokes castError.jsp.
D. Neither mainError.jsp nor castError.jsp is invoked.
Answer: C
No comments:
Post a Comment