PRJ301 Already Rated A+
Which of the following files is the correct name and location of deployment descriptor of a web
application. Assume that the web application is rooted at doc-root. Select the one correct answer
A.
B.
C. doc-rootWEB-INF
D. doc-rootWEB_INF
E. doc-rootWEB-INF
...
Which of the following files is the correct name and location of deployment descriptor of a web
application. Assume that the web application is rooted at doc-root. Select the one correct answer
A. doc-rootdd.xml
B. doc-rootweb.xml
C. doc-rootWEB-INFweb.xml
D. doc-rootWEB_INFdd.xml
E. doc-rootWEB-INFdd.xml
F. doc-rootWEB_INFweb.xml
G. doc-rootWEB-INFlibdd.xml
H.doc-rootWEB-INFclassesdd.xml ✔️C
2. Which element of the servlet element in the deployment descriptor is used to specify the parameters
for the ServletConfig object. Select the one correct answer.
A. aservlet-config
B. init-param
C. load-on-startup
D. filter ✔️B
3. Which of these is true about deployment descriptors. Select the one correct answer.
A. The order of elements in deployment descriptor is not important. The elements can follow any order.
B. The elements of deployment descriptor are case insensitive.
C. The servlet-mapping element, if defined, must be included within the servlet element.
D. The web-app element must include the servlet element. ✔️A
4. The exception-type element specifies an exception type and is used to handle exceptions generated
from a servlet. Which element of the deployment descriptor includes the exception-type as a sub-
element. Select the one correct answer.
A. error-page
,B. servlet
C. exception
D. error-handling ✔️A
5. Which of these is a correct fragment within the web-app element of deployment descriptor. Select
the one correct answer.
A. <exception> <exception-type> mypackage.MyException</exception-type> <location>
/error.jsp</location> </exception>
B. <error-page> <exception-type> mypackage.MyException</exception-type> <location>
/error.jsp</location> </error-page>
C. <error-page> <exception> mypackage.MyException </exception-type> <location> /error.jsp
</location> </error-page>
D. <error-page> <exception-type> mypackage.MyException</exception-type> </error-page>
F. <error-page> <servlet-name> myservlet</servlet-name> <exception-type>
mypackage.MyException</exception-type> </error-page>
G. <exception> <servlet-name> myservlet</servlet-name> <exception-type>
mypackage.MyException</exception-type> </exception> ✔️B
6. Which element of the deployment descriptor of a web application includes the welcome-file-list
element as a subelement. Select the one correct answer.
A. web-app
B. welcome-file
C. servlet
D. file-list ✔️A
7. Which of these is a correct fragment within the web-app element of deployment descriptor. Select
the two correct answer.
A. <error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page>
B. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error-
code> <location>/error.jsp</location> </error-page>
, C. <error-page> <exception-type>mypackage.MyException</exception-type> <error-code>404</error-
code> </error-page>
D. <error-page> <exception-type>mypackage.MyException</exception-type>
<location>/error.jsp</location> </error-page> ✔️AD
8. Which of these is a correct example of specifying a listener element resented by MyClass class.
Assume myServlet element is defined correctly. Select the one correct answer.
A. <listener>MyClass</listener>
B. <listener> <listener-class>MyClass</listener-class></listener>
C. <listener> <listener-name>aListener</listener-name> <listener-class>MyClass</listener-class>
</listener>
D. <listener> <servlet-name>myServlet</servlet-name> <listener-class>MyClass</listener-class>
</listener> ✔️B
9. The root of the deployment descriptor is named as
A. web
B. web-app
C. name
D. display-name ✔️B
10. With in a context-param element of deployment descriptor, which of the following element is
required?
A. param-name
B. name
C. init-param
D. servlet-name ✔️A
11. Which of these is not a valid top level element in web-app
A. icon
B. listener
C. eror-page
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller CertifiedGrades. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.